Using nothing but bamboo poles and remarkable ingenuity, one Thai villager succeeded in beating back the waves that had slowly engulfed his seaside community and robbed it of precious land.
But now that heroic feat may be undone by a new foe -- the forces of climate change that are inexorably pushing up sea levels even as Thailand's vast Chao Phraya river delta, home to 25 million people, continues to sink.
An hour's drive from this village, negotiators from 180 nations are gathered in the capital Bangkok trying to hammer out a global treaty to forestall the worst ravages of global warming.
But Vorapol Dounglomchan's battle against environmental catastrophe began nearly 30 years ago, when he helplessly watched the house he grew up in, at the mouth of the Tha Chin River, crumble as the ocean inched its way inland.
Damming upstream along the river basins that spill into the Gulf of Thailand had prevented sediment from building up, upsetting the delicate balance with the erosive force of the sea.
The clearing of mangrove forests -- whose shallow roots take hold in brackish tropical estuaries around the world -- to set up shrimp and salt farms hastened the destruction.
Dense and slow-growing, the mangrove wood was converted into charcoal, and sold for pennies.
"Over a 20-year period we lost about a kilometer (deep) of coastline," Dounglomchan said, sweeping his arm in an arc over an area that is today nothing but tidal mud flats, punctuated by the concrete skeleton of his home.
Seventy families had to resettle farther inland, he said.
Even more devastating than the loss of some 1,200 hectares (3,000 acres) of land was the upending of the delicate ecosystem upon which the area's rich biodiversity and dense human population had always depended.
Vorapol decided to fight back. For over a decade, he did research, collected data and observed how other communities were coping with the same problem.
What he saw, for the most part, was failure.
Concrete or crushed-rock barriers worked for a while, but were expensive and didn't allow for the delicate and necessary interplay of fresh and ocean waters. Sandbagging was close to useless.
"I realised I couldn't defeat the water, that I had to work with it," he recalled.
Then one day, about six years ago, he noticed some bamboo poles sticking out of shallow water, used by farmers for growing mussels. It was a light-bulb moment.
"It occurred to me that round contours of the vertical poles might work better," he said.
Properly spaced poles would dampen the force of the waves, he reasoned. The permeable barrier might also allow for a more natural exchange between the marine and freshwater environments.
So Vorapol began experimenting on his own, erecting bamboo screens made of thousands of poles driven into the seabed, running along the coastline like giant hedgerows.
For years he laboured on his own, before other villagers came to lend a hand. To finance the trials, which lasted years, he sold land and then a small business he ran in Bangkok.
"People didn't understand and told me it was a waste of time and energy. They said I was crazy," he said.
Vorapol himself began to despair when the experiments failed, but remained convinced his basic idea was sound.
It was about that time that Pinsak Suraswad, a marine biologist with Thailand's Department of Marine and Coastal Resources, stumbled onto the bamboo barriers while surveying the coast.
"I had not seen anything like it before, but I realised immediately that it might work," he said.
Pinsak crunched some numbers and ran computer models to figure out what configuration would work best, and Vorapol tried again. This time, it worked.
The sturdy bamboo poles, packed tightly together and laid out in three rows along the coastline, trapped sediment from the lapping seawater, and prevented silt coming down river from escaping.
The technique has helped restore several hundred metres (yards) of land that is today planted with mangrove saplings, and has been imitated all along the Gulf of Thailand coast, as well as on the tourist island of Phuket.
But two looming forces could easily overwhelm the bamboo barricades.
One is the fact that the entire Chao Phraya area -- like most of the world's major deltas -- is sinking due to a reduced accumulation of sediment, extraction of resources and depleted water tables.
A study published in the scientific journal Nature last month put the delta in the highest category of risk, and said the zone subject to serious flooding could expand by 50 percent this century.
The other is climate change, which scientists say is likely to push up sea levels by at least a metre unless drastic action is taken to reduce the heat-trapping greenhouse gases driving global warming.
"This is beyond the capacity of the villagers to solve. We will need help," said Vorapol.
"But we will do what we can," he added, with a modest grin.