In another breakthrough for China's anti-piracy efforts, four major record labels have signed a deal to license music to a Chinese Internet firm in exchange for royalties, after the company had previously been accused of hosting links to illegal music downloads.

The record labels struck the deal last week with Internet portal operator and search engine company Sohu.com, according to a Monday posting on the Beijing's High Court website. The record labels include Universal Music, Warner Music, Sony Music and China's Gold Typhoon Entertainment.

The record companies had previously filed lawsuits against Sohu, alleging that its search service offers links to pirated music downloads. Starting in August 2010, however, the Beijing court worked to broker a deal between the companies.

"A ruling on the matter would have left the dispute on both sides unresolved, and also could have deepened the grievances between the two groups," the court said. The original lawsuit involved 105 popular songs, and sought a compensation of 54 million yuan (US$8.6 million).

Under the new agreement, Sohu has agreed to invest in an anti-piracy fund of industry group, the International Federation of the Phonographic Industry. The company will also gain access to the four record labels' music catalogues, and Chinese users will be able to download the songs via the company's Sogou site for free.

Sohu did not immediately comment.

The deal comes almost two years after Chinese search giant Baidu also reached a similar agreement to pay record labels to offer licensed music downloads. Like Sohu, Baidu had also been accused of offering a large catalogue of links to pirated music downloads through its MP3 search site. But the company has since dropped the site, and replaced it with a music platform offering official free downloads to songs.