Apple has emerged as the surprise buyer of the unscripted TV series based on the “Carpool Karaoke” segment of CBS’ “The Late Late Show with James Corden.”

The tech giant’s Apple Music service will distribute the series to its members in 100 countries worldwide. Apple sees the show as a natural vehicle to drive online activity for its streaming-music venture.

“Carpool Karaoke” segments, in which Corden drives around in a compact car with a musician or celebrity singing hit songs, has been a spur for sales and streaming activity for the songs featured in the segments — which made it a natural acquisition for Apple Music. The show sparked a bidding war among cable and subscription VOD outlets because of the segments have been such viral sensations for “Late Late Show,” which impressed by nabbing an Emmy nomination for talk-variety show in its first year of eligibility.

“We love music, and ‘Carpool Karaoke’ celebrates it in a fun and unique way that is a hit with audiences of all ages,” said Eddy Cue, Apple’s senior vice president of Internet software and services. “It’s a perfect fit for Apple Music — bringing subscribers exclusive access to their favorite artists and celebrities who come along for the ride.”

The most recent installment with first lady Michelle Obama and Missy Elliott has grabbed nearly 32 million views on YouTube since July 20. “Carpool” segments to date have generated more than 800 million views, according to CBS.

“We couldn’t be more excited to be partnering with Apple Music on this exciting new series of ‘Carpool Karaoke,’ ” said Winston. “The joy of ‘Carpool’ is both the intimacy it creates, while seeing the love our passengers have for music. Where better to showcase that than with Apple Music.”

Apple has licensed 16 episodes of the show, to be exec produced (but not hosted) by Corden and “Late Late Show” exec producer Ben Winston for the pair’s Fulwell 73 banner and CBS TV Studios. Scott Koondel, CBS’s chief content licensing officer, spearheaded the sale process and helped drive the initiative to adapt the segment as a regular series. Cue, Apple’s senior VP of Internet software and services, Jimmy Iovine and Robert Kondrk steered the deal for the company.

“We’re delighted to bring one of the biggest viral hits, ‘Carpool Karaoke,’ to Apple Music, where our new series will be available on this phenomenally popular subscription service,” said Koondel.

While centered around streaming music, Apple Music has been turning to original video content as an exclusive bonus for its 15 million-plus paying subscribers as it fights in the competitive segment against the likes of Spotify and Google Play.

Apple is still in the nascent stages of developing original TV-style content, and given that it’s still new to the process of traditional series licensing deals sealing the deal with CBS took nearly three months.

The tech giant is said to have greenlit a scripted series from Dr. Dre, co-founder of music company Beats, which Apple acquired for $3 billion. This spring, Apple Music launched a music docu-series from Vice Media and last December exclusively live-streamed a Taylor Swift concert special from her “1989” tour. In addition, Apple has ordered “Planet of the Apps,” a reality-competition TV show featuring 100 aspiring app developers, from Propagate Content’s Ben Silverman and Howard Owens and musician-entrepreneur Will.i.am, which is designed to highlight Apple’s App Store business.

Apple Music will release the “Carpool Karaoke” episodes on a weekly basis. Production is expected to begin soon with a premiere date to be announced. In becoming a regular series, “Carpool Karaoke” will emphasize a travelogue element with celebrities taking the host (who is still be cast) on a trip to places of personal significance to each guest.

CBS still has the option of licensing a second window of the show to a traditional TV outlet. And just as CBS has set up an eye-popping deal for “Carpool Karaoke,” Koondel is said to be hitting the market with a series adaptation of another “Late Late Show” segment, the celebrity “rap battle” showdown “Drop the Mic.”

Todd Spangler contributed to this report.