Bloggers and US internet providers cannot be liable for posting defamatory comments written by third parties, the California Supreme Court has ruled.
Google was one of the firms backing the appeal
It followed the case of San Diego woman sued after posting allegedly libellous comments online about two doctors.
Some of the internet's biggest names including Google, eBay and Amazon have supported a woman in a US legal battle that may save them from libel cases.
The judges said the ruling would protect freedom of expression.
Overturning a decision by the San Francisco appeal court, the court ruled that people claiming they were defamed online could now only seek damages from the original author of the comments - and not the website which re-posted it.
The court ruled that that Internet Service Providers were protected by US Federal law that said providers of chat rooms or news groups are not considered the publishers of information furnished by others.
"The prospect of blanket immunity for those who intentionally redistribute defamatory statements on the Internet has disturbing implications," said Associate Justice Carol A. Corrigan.
"Nevertheless ... statutory immunity serves to protect online freedom of expression and to encourage self-regulation, as Congress intended."
The lawsuit involved a health activist who posted someone else's letter on her web site. The subject of the letter sued the activist - as well as the author - for libel.
Internet service providers have long argued that, like telephone companies, they were "common carriers" who could not be subject to libel laws.