Five years ago News Corp bought it for $580m – then it was crushed by Facebook, leaving it at a fraction of its peak value

Myspace, once the world's hottest internet firm, has been sold to an online ad company for around $35m, a fraction of the $100m its parent company was seeking for the ailing social network and billions less than its value five years ago.

Rupert Murdoch's News Corporation bought Myspace in 2005 for $580m. In 2006 Google signed a $900m deal to sell ads on Myspace; by 2007 it had 300m registered users and was being valued at $12bn. But the social network was subsequently crushed by Facebook, which launched a year after Myspace.

News Corp put Myspace up for sale this year, engaging investment bank Allen & Co to find a buyer. News had been looking for $100m but settled for $35m offer from advertising targeting firm Specific Media. The sale is believed to be mainly in stock and News Corp will retain a small holding.

Myspace is expected to shed more than half of its 500 remaining members of staff as part of the deal. The layoffs follow a 30% staff reduction in April 2010 and a further cut of 47% in January 2011. Two years ago Myspace employed more than 1,400 people.

Facebook passed Myspace in terms of numbers of users two years ago. As people dropped Myspace, so did advertisers. Market research firm eMarketer estimates that the site will earn about $183m in worldwide ad revenues this year, down from $605m at its peak.

The sale comes as a new generation of internet firms are attracting sky-high valuations. Zynga, the online games developer behind hits including CityVille and FarmVille, is planning an initial public offering (IPO) that could value it at $20bn. LinkedIn, the business-focused social network, has already gone public and is valued at $8.6bn. Next year Facebook is expected to go public – analysts have estimated it could be worth $80bn or more.