Apple has confirmed it is buying Beats for $3bn (£1.8bn) which will see co-founders Dr. Dre and Jimmy Iovine join the iPhone maker as executives.

Speaking to the New York Times as he announced the deal Apple CEO Tim Cook said: "These guys are really unique. It's like finding the precise grain of sand on the beach. They're rare and very hard to find."

Apple will essentially buy two companies, the Beats Music streaming service and the Beat Electronics company which makes the company's iconic headphones.

In a press release, Iovine said:

"I've always known in my heart that Beats belonged with Apple. 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."

The deal will see the Beats brand remain separate but will see Apple sell the premium Beats headphones as well as offer it customers the curated music streaming service Beats Music which many see as the key part of the deal.

Apple said that its iTunes service would continue to sell individual tracks, and the company would also continue to offer its radio streaming service iTunes Radio.

The deal will be paid for with $2.6 billion in cash and $400 million in stock, making it the biggest acquisition in the company's history.

While Apple plays up the street cred Beats brings with it in its official announcement of the deal, it doesn't give any indication of what plans it has for using the Beat technology in the future.

Cook did say however: "[Beats] going to be coming up with ways of features that blow your mind and products you haven't thought of yet, and seeing around the next corner to articulate the way to take music to an even higher level than it is now."

The deal had been widely rumoured for many weeks with some suggesting the delay in announcing it could have been down to Apple not liking a pretty public announcement on Facebook by Dr. Dre about the deal.