The upper house of Britain's parliament, the House of Lords, has thrown out an arsenic poisoning case brought by a Bangladeshi resident.
Millions of Bangladeshis may be drinking unsafe water
It ruled that he could not succeed in legal action against a British agency which he claimed should have warned him about arsenic in drinking water.
The ruling said that the case brought by Binod Sutradhar was "hopeless".
The World Health Organization says that between 28 to 35m Bangladeshis drink arsenic contaminated water.
The poisoning is naturally occurring and affects underground water supplies and water provided from wells.
The test case was brought by Binod Sutradhar, who lives in the Brahmanbaria district, 80 kms (50 miles) east of Dhaka.
He alleged that he developed arsenic poisoning after he drank water from a shallow well dug in his village in 1983.
Mr Sutradhar was seeking to sue a branch of the British agency, the Natural Environment Research Council (NERC), for negligence.
His lawyers argued that the British Geological Survey (BGS) failed to detect arsenic when it conducted tests on water from deep wells in the 1980s and 1990s.
But the panel of five judges at the House of Lords - the highest court in England - all agreed that there was no duty on the BGS to test for arsenic.
They upheld a similar ruling made by the court of appeal two years ago.
The judges said that the BGS had made clear from the outset that it had not conducted arsenic tests.
Lord Hoffman, in the ruling on the case, said the tests had no relation to the shallow well serving Mr Sutradhar's village, and it was not the practice at the time to test for arsenic.
The agencies "can be liable only for the things they did and the statements they made, not for what they did not do," he said in his ruling.
"In my opinion the claim is hopeless," he said.
The court said that Mr Sutradhar had "no reasonable prospect of satisfying a court that in all the circumstances the NERC owed him a duty of care" which could have paved the way for damages to be awarded.
Correspondents say that if successful the legal action could have cost the British taxpayer millions of dollars in compensation.