LAS VEGAS—Apple's iTunes app is coming to Samsung TVs.

Samsung announced the surprise partnership with Apple ahead of CES here on Sunday, even as both companies continue to battle it out in the smartphone space.

Despite the rivalry, the Korean electronics maker said Samsung smart TVs released this year will come with a built-in Apple iTunes Movie & TV Shows app. Older 2018 Samsung TV models will receive the iTunes app through a firmware update.

"Samsung customers can access their existing iTunes library and browse the iTunes Store to buy or rent from a selection of hundreds of thousands of movies and TV episodes—including the largest selection of 4K HDR movies," Samsung said in the announcement.

More From PCmag

The partnership may hint at Apple's larger ambition of providing a widely available TV and movie streaming service like Netflix already offers. Cupertino has produced original content like Carpool Karaoke and Planet of the Apps, to mixed reviews, but is also now investing in prestige drama shows with A-listers like Reese Witherspoon, Jennifer Aniston, and Steve Carell.

In the past, iTunes has only been available on Apple hardware, including the company's streaming box, Apple TV. But to reach a wider audience, the company will have to branch out to other platforms including Android and Samsung's Tizen operating system. Apple Music, for instance, is also available on Android and Amazon's Echo devices.

But for now, the iTunes Movies and TV Shows app will debut only on Samsung TVs in more than 100 countries, according to the Korean electronics maker.

Samsung TVs will also support Apple's AirPlay 2, allowing iPhone owners to stream media like movies and music from their handset to a Samsung TV.

"We look forward to bringing the iTunes and AirPlay 2 experience to even more customers around the world through Samsung Smart TVs, so iPhone, iPad and Mac users have yet another way to enjoy all their favorite content on the biggest screen in their home," Apple SVP Eddy Cue said in the announcement.

This article originally appeared on PCMag.com.