On Wednesday, Apple made its biggest bet on the future of music since it first transformed the industry more than a decade ago with its iTunes music store.

The tech giant made its largest acquisition ever, agreeing to pay $3 billion in a deal to acquire the maker of the popular Beats headphones, along with the streaming music service Beats Music.

The announcement caps off weeks of speculation surrounding the deal, which will see Beats co-founders Jimmy Iovine and Dr. Dre join Apple to play an unspecified role. Apple will pay $2.6 billion in cash and $400 million in equity that will vest over time, the company said.

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

With the transaction, Apple is once again rocking the music business — an industry it changed forever when it released iTunes 13 years ago and brought digital music sales to the masses.

"Music is such an important part of Apple’s DNA and always will be,” said Apple senior vice president Eddy Cue.

In recent years, however, buying music online has mostly given way to streaming it from the cloud on a free or subscription basis. The result is that other competitors, such as Spotify, Pandora and Rdio, have taken an increasing share of the music market. Last week, Spotify announced that it had reached 10 million paying users worldwide.

Apple's purchase of Beats will likely enhance the company's cool factor, particularly among those who haven't been wooed by the tech firm's gadgets to date. But over the longer term, Apple may lean more heavily on Beats Music to help it compete in the streaming music business.