Apple has announced it has agreed to acquire the subscription streaming music service Beats Music, and Beats Electronics, which makes the popular Beats headphones, speakers and audio software.

As part of the acquisition, Beats co-founders Jimmy Iovine and Dr. Dre will join Apple. Apple is acquiring the two companies for a total of $3 billion, consisting of a purchase price of approximately $2.6 billion and approximately $400 million that will vest over time.

“Music is such an important part of all of our lives and holds a special place within our hearts at Apple,” says Apple CEO Tim Cook. “That’s why we have kept investing in music and are bringing together these extraordinary teams so we can continue to create the most innovative music products and services in the world.”

“I’ve always known in my heart that Beats belonged with Apple,” says Jimmy Iovine. “The idea when we started the company was inspired by Apple’s unmatched ability to marry culture and technology. Apple’s deep commitment to music fans, artists, songwriters and the music industry is something special.”

“Music is such an important part of Apple’s DNA and always will be,” adds Eddy Cue, Apple’s senior vice president of Internet Software and Services. “The addition of Beats will make our music lineup even better, from free streaming with iTunes Radio to a world-class subscription service in Beats, and of course buying music from the iTunes Store as customers have loved to do for years.”

With the acquisition the Beats product lineup will be offered in many more countries through the Apple Online Store, Apple’s retail stores and select Apple Authorized Resellers. Subject to regulatory approvals, Apple expects the transaction to close in the fiscal fourth quarter.