News Corp's MySpace said on Thursday it has agreed to buy music recommendation service iLike, as the once-hot social networking site tries to reinvent itself as an entertainment portal.

MySpace declined to disclose financial terms of an acquisition that brings iLike's twin brother founders Ali and Hadi Partovi and Nat Brown into the MySpace fold.

The site was backed by venture capital funds and Ticketmaster Entertainment. Several blogs, including AllThingsDigital, reported earlier in the week that iLike would be bought by MySpace for around $20 million.

iLike is best known as a popular social music discovery service on Facebook, the social networking site that has overtaken MySpace as the top Web destination for friends and family to share photos, messages, video clips and other media.

MySpace, which was once the most popular and fastest growing social networking site just two years ago, has lost ground with users who have moved onto Facebook or other sites.

We think that integration of iLike should help drive stickier traffic and ultimately improve monetization of MySpace user base, said JP Morgan analyst Imran Khan.

The acquisition comes as News Corp owner Rupert Murdoch has pressed to reinvent MySpace as an entertainment portal, taking advantage of its continued strength in areas like music and movies.

While it is still one of the most popular video and music sites, data from Nielsen shows time spent by users on MySpace fell by 31 percent between April 2008 and April 2009. In the same period, user time on Facebook grew 700 percent.

MySpace Chief Executive Owen Van Natta said on a conference call that iLike's social discovery technology can be extended to other areas for MySpace users beyond music -- areas such as entertainment, video and games.

He explained this is why MySpace, rather than MySpace Music, made the acquisition. MySpace Music, which launched last September, is a joint venture between MySpace and the four major music companies EMI Group, Sony Music Entertainment, Warner Music Group and Universal Music Group.

(Reporting by Yinka Adegoke; Editing Bernard Orr)