Irvine-based media buying agency Specific Media LLC bought social networking site Myspace from News Corp. on Wednesday.

The deal ended months of speculation about the sale of the struggling site.

Terms of the deal aren’t being disclosed.

News Corp. will retain a minority stake in Specific Media, which buys online ad space and then resells it to advertisers.

Media reports place the price of Myspace at around $35 million.

News Corp. paid $580 million for the company in 2005.

Myspace lost popularity in recent years as users flocked to newer social networking sites such as Facebook and LinkedIn.

Buying Myspace gives Specific Media access to information on users of the site, which could be helpful in selling space to advertisers.

It’s unclear if Specific Media will make changes to the site.

“We look forward to combining our platforms to drive the next generation of digital innovation,” said Specific Media Chief Executive Tim Vanderhook.

Specific Media raised about $100 million in private equity funding in 2007 and since then has gone on a buying spree for other digital agencies.

It bought Amsterdam-based AdCombination BV in December, which allowed it to expand its business into Belgium, the Netherlands and Luxembourg.

In October Specific Media paid an estimated $55 million in cash and stock for New York video ad streaming provider Broadband Enterprises Inc.

In 2008, Specific Media acquired London-based Adviva Media Ltd.