Apple confirmed on Wednesday that it will buy Beats Electronics and Beats Music for $3 billion, by far the largest acquisition in its history.

Apple is buying the two companies for a purchase price of about $2.6 billion and approximately $400 million that will vest over time. Beats cofounders Jimmy Iovine and Dr. Dre will join Apple. Rumors of the acquisition surfaced earlier this month.

According to The New York Times, the Beats brand will remain separate from Apple’s. Apple will offer both Beats’s streaming music service and its premium headphones.

Beats could provide Apple with additional talent and resources for designing hardware like wearable devices. The deal could be also useful in helping Apple to improve iTunes and iTunes Radio in particular, and better adapt as consumers shift from downloads to streaming.

Beats launched its streaming service earlier this year, but it has reportedly gotten off to a rocky start.

“Music is such an important part of all of our lives and holds a special place within our hearts at Apple,” Tim Cook, Apple’s CEO, said in a statement. “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.”

Welcome beat to Apple

“I’ve always known in my heart that Beats belonged with Apple,” Iovine said. “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.”