A man who lost his job and was harassed by strangers after his infidelity to his late wife was detailed online has won China's first case against Internet vigilantism, the China Daily said on Friday.

A Beijing court ruled Wang Fei's reputation had been damaged by his late wife's university classmate, Zhang Leyi, who posted online the diary excerpts she wrote months before she killed herself, and by the internet company that hosted the comments.

Download the new Independent Premium app Sharing the full story, not just the headlines

"As Zhang was spreading the details of the affair, he also gave out details of Wang's real name, name of his company and even family addresses, which infringed the plaintiff's privacy rights," the chief judge said.

Zhang was ordered to pay Wang 5,000 yuan (£484) and the Beijing Lingyun Interactive Information and Technology, was ordered to pay 3,000 yuan.

He said he began the website that carried the diary narrating (Wang's wife) Jiang's misery after discovering her husband's adultery two months earlier, to "commemorate Jiang's death and help bring her justice."

Internet users angered by the story mounted a cyber manhunt for the twenty-something Wang, mobilizing the phenomenon known in China as the "human flesh search engine."

Wang was reportedly forced to resign, and had trouble finding another job, after strangers tracked him down and contacted the companies where he and his lover worked, the paper said.

Expletives were painted on his parents' door, and his photos, addresses, and phone numbers were made public online.

China's 290 million-odd Internet users have claimed the scalps of several government officials through such disclosures in recent years.

Last month, China's transport ministry fired an official for manhandling an 11-year-old girl at a local restaurant, after Internet users posted images and his personal details online.

However the online mob's harassment of more mundane characters involved in domestic disputes has left academics bemoaning China's weak privacy laws.