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 250,000 paying subscribers, compared with Spotify's 10 million.