The long-awaited consolidation in the music streaming space is underway.

Rhapsody has acquired Napster from electronics giant Best Buy for an undisclosed price. The deal will combine two of the largest streaming services in the U.S. and could roughly double the number of Rhapsody subscribers.

The transaction is expected to close by the end of next month and will result in Best Buy receiving a minority ownership stake in Rhapsody. Financial terms of the deal were not disclosed.

“This is a ‘go big or go home’ business, so our focus is on sustainably growing the company,” said Rhapsody president Jon Irwin in a statement. “This deal will further extend Rhapsody’s lead over our competitors in the growing on-demand music market.”

Napster, to some, is still best known for kicking off the digital music revolution by allowing peer-to-peer sharing of MP3 files in the early part of the decade. The majority of that sharing was of pirated copies of songs. Best Buy acquired the company, which had retooled as a music streaming service, for $121 million in 2008.

Rhapsody currently has over 800,000 subscribers. At the time of its acquisition by Best Buy, Napster was claiming to have nearly 700,000, though it’s unclear where the company’s current subscriber count stands.

The merger between the two companies comes as the digital music market has seen competition intensify this year. Rhapsody and Napster are both well-known names in the streaming market, but the U.S. launch of Spotify and the successful IPO of Pandora earlier this year signaled a change in stakes. The launch of Amazon Cloud Player, Sony’s Music Unlimited and Google Music further muddied the waters.

Last month, the streaming music market got another big potential boost with the revamp of Facebook, which now allows users to share streaming content with each other via a live-ticker feed.

Users won’t be able to join their friends in listening to songs unless they’re members of the same streaming service, though, which has prompted a land rush. (For instance, if one subscribes to Rhapsody, but another uses Spotify, they won’t be able to listen together until one switches services.)

The first service to gain critical mass on Facebook could well prove to be the winner in the streaming music space. And by being prominently featured onstage during Facebook’s f8 summit, Spotify was given a big head start.

Rhapsody instantly fired back, though, announcing a new 30-day trial program for Facebook users, which will provide unlimited access to its catalog of 13 million songs. Users are not required to provide credit card information when they sign up and don’t have to worry about being automatically converted to subscribers at the end of the trial. (The service normally costs $10 per month.)

Rhapsody was one of the first online music services to establish itself after the Napster lawsuits were winding down. Lately, though, it has been in danger of being overshadowed by Spotify, which has a sizable following in Europe and has quickly attracted U.S. customers. (The free version of Spotify attracted 1.4 million members in its first month — and converted 175,000 of those — a whopping 12.5 percent – to paying customers in that time.)

“There’s substantial value in bringing Napster’s subscribers and robust IP portfolio to Rhapsody as we execute on our strategy to expand our business via direct acquisition of members and distribution deals,” said Irwin.