Baidu, the dominant search engine in China, says it has reached a digital music distribution deal with three of the world's largest music-recording labels that ends years of litigation over pirated music.

Baidu reached an agreement to stream and download Chinese and international music from One-Stop China, a joint venture of Universal Music, Warner Music, and Sony Music, the company today said in a statement. The China search giant will license the labels' catalogs and future releases, paying royalties for each song played or downloaded.

"This deal connects One-Stop's world-class repertoire of licensed music to a massive audience, creating crucial new opportunities for artists," the joint venture said in the statement. "All parties, especially music fans, will benefit from the growth of this type of compelling music service."

The agreement includes a conciliation agreement that ends outstanding litigation between the three record companies and Baidu.

Baidu had for years offered music search, allowing people to seek out and download MP3 tracks across the Web. However, when the offering first launched, many people used it to find and download pirated copies of songs.

China's Music Copyright Society sued Baidu in 2008 for allegedly providing "music listening, broadcasting and downloading services in various forms on its Web site without approval, and through unfettered piracy, earning huge advertising revenue on its huge number of hits."

The International Anti-Piracy Caucus, a group of lawmakers that works closely with the music, movie, and software industries, listed Baidu last year as among the Web's infamous for being "overwhelmingly used for the global exchange of illegal movies, music and other copyrighted works."