Apple has confirmed it will buy headphone maker and music-streaming service provider Beats Electronics.
The deal is worth a total of $3bn (£1.8bn), and is thought to be Apple’s largest acquisition to date.
As part of the acquisition, Beats co-founders Jimmy Iovine and Dr Dre will join the technology firm.
Apple boss Tim Cook said the deal would allow the firm to “continue to create the most innovative music products and services in the world”.
In a statement, Apple said it is paying an initial $2.6bn (£1.6bn) for Beats, and approximately $400m (£239m) “that will vest over time.”
Beats was founded in 2008 by music producer Jimmy Iovine and hip-hop star Dr Dre and until recently was best known for its headphones.
It started a subscription-based music streaming service earlier this year.
Apple has its own iTunes store, the world’s largest music download service, and launched iTunes Radio last year.
But despite having been an early pioneer of digital music, the Californian firm has been facing increased competition from subscription services such as Spotify, Pandora and Rdio.
However, Beats’ music service only has about 110,000 subscribers, compared with Spotify’s 10 million.
The deal with Beats also marks a departure for Apple, which has a reputation for developing new products in-house, rather than buying up smaller firms – a method preferred by rivals Google.
But in an interview with the New York Times, Mr Cook hinted that Beats’ founders may have been part of the attraction.
“Could Eddy’s team [Eddy Cue, Apple executive in charge of iTunes] have built a subscription service? Of course,” he told the newspaper.
“You don’t build everything yourself. It’s not one thing that excites us here. It’s the people. It’s the service.”
“These guys are really unique,” Mr Cook added. “It’s like finding the precise grain of sand on the beach. They’re rare and very hard to find.”
The Apple boss also said that Dr Dre and Mr Iovine would be coming up with “products you haven’t thought of yet”.