To control unpredictable water and stop floods, you might build a dam. To build a dam, you generally need hills and dales—geographic features to hold water in a reservoir. Which is why dams don’t fare well in Bangladesh, most of which is a flat floodplain that’s just a few feet above sea level.

Instead, in a happy accident, millions of Bangladeshi farmers have managed to create a flood control system of their very own, taking advantage of the region’s wet-and-dry seasonal climate. As farmers pump water from the ground in the dry season, they free up space for water to flood in during the wet season, hydrogeologists found. 

Researchers published the system they’d uncovered in the journal Science on September 15. And authorities could use the findings to make farming more sustainable, writes Aditi Mukherji, a researcher in Delhi for the International Water Management Institute who wasn’t involved in the paper, in a companion article in Science.

“No one really intended this to happen, because farmers didn’t have the knowledge when they started pumping,” says Mohammad Shamsudduha, a geoscientist at University College London in the UK and one of the paper’s authors.

[Related: What is a flash flood?]

Most of Bangladesh lies in the largest river delta on the planet, where the Rivers Ganges and Brahmaputra fan out into the Bay of Bengal. It’s an expanse of lush floodplains and emerald forests, blanketing some of the most fertile soil in the world. Indeed, that soil supports a population density nearly thrice that of New Jersey, the densest US state.

Like much of South Asia, Bangladesh’s climate revolves around the yearly monsoon. The monsoon rains support local animal and plant life and are vital to agriculture, too. But a heavy monsoon can cause devastating floods, as residents of northern Bangladesh experienced in June.

Yet Bangladesh’s warm climate means that farmers can grow crops, especially rice, in the dry season. To do so, farmers often irrigate their fields with water they draw up from the ground. Many small-scale farmers started doing so in the 1990s, when the Bangladeshi government loosened restrictions on importing diesel-powered pumps and made them more affordable. 

The authors of the new study wanted to examine whether pumping was depriving the ground of its water. That’s generally not very good, resulting in strained water supplies and the ground literally sinking (just ask Jakarta). They examined data from 465 government-controlled stations that monitor Bangladesh’s irrigation efforts across the country.

[Related: How climate change fed Pakistan’s devastating floods]

The situation was not so simple: In many parts of the country, groundwater wasn’t depleting at all.

It’s thanks to how rivers craft the delta. The Ganges and the Brahmaputra carry a wealth of silt and sediment from as far away as the Himalayas. As they fan out through the delta, they deposit those fine particles into the surrounding land. These sediments help make the delta’s soil as fertile as it is. 

This accumulation also results in loads of little pores in the ground. When the heavy rains come, instead of running off into the ocean or adding to runaway flooding, all that water can soak into the ground, where farmers can use it.

Where a dam’s reservoir is more like a bucket, Bangladesh is more like a sponge. During the dry season, farmers dry out the sponge. That gives it more room to absorb more water in the monsoon. And so forth, in an—ideally—self-sustaining cycle. Researchers call it the Bengal Water Machine. 

“The operation of the [Bengal Water Machine] was suspected by a small number of hydrogeologists within our research network but essentially unknown prior to this paper,” says Richard Taylor, a hydrogeologist at University College London in the UK, and another of the paper’s authors.

“If there was no pumping, then this would not have happened,” says Kazi Matin Uddin Ahmed, a hydrogeologist at the University of Dhaka in Bangladesh, and another of the paper’s authors. 

Storing water underground instead of a dam has a few advantages, Ahmed adds. The subsurface liquid is at less risk of evaporating into useless vapor. It doesn’t rewrite the region’s geography, and farmers can draw water from their own land, rather than relying on water shuttled in through irrigation channels.

The researchers believe that other “water machines” might fill fertile deltas elsewhere in the tropics with similar wet-and-dry climates. Southeast Asia might host a few, at the mouths of the Red River, the Mekong, and the Irrawaddy.

But an ominous question looms over the Bengal Water Machine: What happens as climate change reshapes the delta? Most crucially, a warming climate might intensify monsoons and change where they deliver their rains. “This is something we need to look into,” says Shamsudduha.

The Bengal Water Machine faces several other immediate challenges. In 2019, in response to overpumping concerns, the Bangladeshi government reintroduced restrictions on which farmers get to install a pump, which could make groundwater pumping more inaccessible. Additionally, many farmers use dirty diesel-powered pumps. (The government’s now encouraging farmers to switch to solar power.)

Also, keeping the Bengal Water Machine ship-shape means not using too much groundwater. Unfortunately, that’s already happening. Bangladesh’s west generally gets less rainfall than its east, and the results reflect that. The researchers noticed groundwater depletion in the west that wasn’t happening out east.

“There is a limit,” says Ahmed. “There has to be close monitoring of the system.”