China's leading web search engine has been cleared of copyright infringement by a Beijing court.
Many music companies have blamed falling CD sales on piracy
Baidu.com faced a lawsuit from music companies after posting links to sites offering illegal music downloads.
But the ruling said the service did not constitute an infringement as the music was downloaded from webservers of third parties, state press reported.
This overturns an earlier ruling, which had ordered Baidu to pay a distributor of EMI 68,000 yuan (£8,400).
Companies including EMI, Sony BMG, Warner Music and Universal Music had demanded a public apology from Baidu, the suspension of its download service and 1.73m yuan ($216,250) compensation.
Baidu argued the MP3 search engine it provided was the same as other search engines providing links to web pages, news and pictures.
"If the music companies had won, the whole search engine sector would have ground to a halt," Xinhua news agency quoted a Baidu spokesman as saying.
The report said the music companies would appeal against the ruling.