Researchers have pinpointed the source of what is probably the worst mass poisoning in history, according to a study published Sunday.

For nearly three decades scientists have struggled to figure out exactly how arsenic was getting into the drinking water of millions of people in rural Bangladesh.

The culprit, says the new study, are tens of thousands of man-made ponds excavated to provide soil for flood protection.

An estimated two million people in Bangladesh suffer from arsenic poisoning, and health experts suspect the toxic, metal-like element has caused -- and will continue to cause -- many deaths as well.

Symptoms include violent stomach pains and vomiting, diarrhoea, convulsions and cramps. A large dose can kill outright, while chronic ingestion of small doses has been linked to a large range of cancers.

It has long been known that the arsenic comes from water drawn from millions of low-tech "tube wells" scattered across the country.

Ironically the wells were dug -- often with the help of international aid agencies -- to protect villages from unclean and disease-ridden surface water.

Tragically, millions of people continue to knowingly poison themselves for lack of an alternative source of water.

Earlier studies succeeded in filling in a few pieces of the deadly puzzle.

They showed that water with the highest concentrations of arsenic is roughly 50 years old, and that the organic carbon which, once metabolised by microbes causes the poison to leach from sediment, does not take long to filter down from the surface.

But the source of both the contaminated water and the organic carbon remained unknown until a team of researchers led by Charles Harvey of MIT in Boston, Massachusetts cracked the secret.

Working in the Munshiganj district of Bangladesh, the researchers analysed the flow patterns of surface and underground water in a six square-mile (15.5 square-kilometre) area.

They used natural tracers and a 3-D computer model to track water from rice fields and ponds, and tested the capacity of organic carbon in both settings to free up arsenic from soil and sediments.

"We saw that water with high arsenic content originates from the human-built ponds, and water with lower arsenic content originates from the rice fields," said Rebecca Neumann, a co-author and postdoctoral associate at Harvard.

Chemical analysis showed that the organic compound that unleashes the poison first settles on the bottom of the ponds and then slowly seeps into the ground.

The findings, published in Nature Geoscience, "suggest that the problem could be alleviated by digging deeper drinking water wells below the influence of the ponds, or by locating shallow drinking wells under rice fields," Neumann said in a communique.

The same team of researchers plan to dig such wells in different region to see whether it leads to improved health for villages.

Scott Fendorf, a professor at Stanford University who studies arsenic content in soils and sediments along the Mekong River in Cambodia, said the new study was clearly a breakthrough.

"It shows that human modifications are impacting the arsenic content in the groundwater," he said in a statement. "The ponds ... are having a negative impact on the release of arsenic."