A Dutch court has rejected four out of five allegations against Anglo-Dutch oil giant Shell over oil pollution in Nigeria's Niger Delta region.
But it found a subsidiary of the firm, Shell Nigeria, responsible for one case of pollution, ordering it to pay compensation to a Nigerian farmer.
Shell said it was "happy" with the verdict in the landmark case.
The case was brought by four Nigerian farmers and Friends of the Earth, which says it is "flabbergasted".
The campaign group says it intends to appeal. However, it has welcomed the Dutch court's ruling that Shell's subsidiary was liable on one count.
The BBC's Anna Holligan, who was in court, says both sides are claiming victory.
The case was launched in 2008 in the Netherlands, where Shell has its global headquarters, seeking reparations for lost income from contaminated land and waterways in the Niger Delta region.
It is the first time a Dutch-registered company has been sued in a domestic court for offences allegedly carried out by a foreign subsidiary.
'Fish ponds poisoned'
"We are very pleased with the verdict," Allard Castelein of Shell said after it was announced.
"First of all I should say that we were never pleased with the court case in its own right but we are very pleased that the parent company is not liable under any of the complaints issued."
The case was linked to spills in four areas of the Niger Delta - Goi, Ogoniland, Oruma in Bayelsa State and a third in Ikot Ada Udo, Akwa Ibom State.
The farmers had alleged that oil spills had poisoned their fish ponds and farmland with leaking pipelines.
The court found that the spills were not the result of a lack of security or upkeep but due to sabotage.
The court "dismissed all claims against the parent companies... since pursuant to Nigerian law a parent company in principle is not obliged to prevent its subsidiaries from harming third parties abroad," Judge Henk Wien told the court.
However, in one case, it found subsidiary Shell Nigeria culpable of neglecting its duty of care and ruled that: "Shell could and should have prevented this sabotage in an easy way".
The level of damages in that case will be established at a later hearing.
The Shell Petroleum Development Co is the largest oil and gas company in Nigeria - Africa's top energy producer - with an output of more than one million barrels of oil or equivalent per day.
Only one of the Nigerian plaintiffs, Eric Barizaadooh, was in court on Wednesday and his claim was rejected, But he said he was happy for the village that won compensation.
"For my colleagues who succeeded, that is victory," he said.
"Shell is brought to book. I believe this is a revolutionary case."
The BBC's Will Ross in Lagos says foreign oil companies know that they can be taken to court outside Nigeria.
He notes that cases before the Nigerian courts are moving at a snail's pace and few of the plaintiffs have any faith in the local justice system.
Shell still faces many other legal challenges, our correspondent says.
Another verdict is due later this year in a court in London, in a case that thousands of people from one badly polluted Niger Delta community hope will force Shell to pay compensation.
The company has already admitted responsibility for that oil spill.