The flooding had become inevitable. Every winter, amid heavy rains and storms, the Mediterranean Sea would rise and spill over into fisherman Aziz Lasheen's low-lying village in Egypt's northern governorate of Kafr El-Sheikh.
As water poured into the village of Mastroua it would destroy homes, saturate farmland with saltwater and cover the road Lasheen and others walked to reach their fishing boats.
"As fishermen and farmers, we were scared to go to work as the rising water covered up the shore. The tide was so high," the 33-year-old said.
That meant his income dropped by 70% every winter. "During that time of the year, I used to use my savings to afford my family's needs," he told the Thomson Reuters Foundation.
But this past winter, Lasheen had no need to break into his savings, after the construction of a series of low-cost natural dikes to keep the surging waters away from his village during more and more violent storms along the Mediterranean coast.
Egypt, the host of November's COP27 UN climate conference, is scaling up efforts to cushion the densely populated Nile Delta against the increasingly intense flooding that plagues low-lying areas around the world.
As part of a broader $105-million coastal management project led by the United Nations Development Programme (UNDP), the government is building a system of sand dikes along the shores of the Nile Delta to hold back the sea during stormy weather.
Stretching over nearly 70 km (43 miles), the dike system covers five governorates recognized as flooding hotspots - Kafr El-Sheikh, Beheira, Dakahlia, Damietta and Port Said.
The aim is to save the homes and livelihoods of 250,000 Nile Delta residents, said Mohamed Bayoumi, a climate change specialist with UNDP in Egypt.
Launched in 2019, the seven-year project has funding from the Green Climate Fund and the Egyptian Ministry of Water Resources and Irrigation. So far, nearly 70% of the system has been built, Bayoumi said in emailed comments.
"Without the current coastal protection work, the coastal areas are vulnerable to flooding," he said.
"The seawater will flood these lands during storms and disrupt farming activities; farmers would lose the season's crops, which is catastrophic for them."
But some climate experts warn the dikes will only push the problem elsewhere, sending excess water from the protected areas along the Mediterranean coast to the rest of the Nile Delta, which fans out between the cities of Alexandria and Port Said.
"Protecting only the lowlands of the Nile Delta will turn them into small islands in the long term and will largely affect nearby lands and communities," said Abbas Sharaky, professor of geology and water resources at Cairo University.
"The whole area should be protected because the whole Nile Delta region is endangered by climate change, not only the lowlands," he said.
Since the dikes were built near his village last year, Lasheen said life has returned to normal, with fishermen again making a steady income and farmers back to growing crops such as tomatoes and potatoes.
"It is a relief for us now after spending years under stress, struggling to make ends meet," he said.
Drowning breadbasket
As rising temperatures cause the world's ice sheets to melt faster and the ocean to warm and expand, coastal communities face more frequent flooding and harsher storms that drive powerful seawater surges inland, scientists from the Intergovernmental Panel on Climate Change said in a 2019 report.
Home to about a quarter of Egypt's population, according to the UNDP, the Nile Delta - known as Egypt's breadbasket - contributes about 20% of the country's gross domestic product through agriculture, industry and fishing.
A government report released last year pointed to rising sea levels and flooding among various factors that could cause wheat production in Egypt to drop by 15% and rice production to fall by 11% by 2050.
As it tries to stop that from happening, the government is turning to low-cost dikes designed to look like natural dunes.
Made out of beach sand brought inland, the barriers are planted with reeds and local vegetation to help boost biodiversity and encourage them to grow bigger and stronger by trapping blown sand.
In that way, they also help combat erosion, another major factor in increased flooding in the delta, said Jan Dietrich, a project team leader at Danish engineering consultancy NIRAS.
Dietrich heads up another part of the UNDP initiative, Egypt's integrated coastal zone management (ICZM) plan.
The plan, "one of the most extensive of its kind in the world," he said, involves a range of projects - including a new sea level monitoring system - to address flooding, saltwater intrusion, erosion and other problems.
Since the first stage of construction on the Aswan High Dam was completed across the Nile in 1964, less sediment has traveled downriver to naturally fortify the Mediterranean coast, allowing the sea to creep further inland, Dietrich said.
Amid worries the new sand barriers could also be vulnerable to erosion, UNDP's Bayoumi said the Shore Protection Authority will be in charge of maintaining the dike system across Egypt.
The Ministry of Water Resources and Irrigation did not respond to requests for comment.
Sinking cities
The dike system is the latest in a series of projects by the Shore Protection Authority since its establishment in 1981, mainly using structures such as jetties, seawalls and breakwaters to protect the Nile Delta and coastal cities like Alexandria.
Egypt's cultural hub, Alexandria has been named by the World Economic Forum as one of 11 "sinking cities" - along with Lagos in Nigeria and Venice, Italy - expected to be underwater by 2100 if climate change isn't curbed.
But Sharaky, the Egyptian water resources expert, said in his view Egypt has so far been using only temporary solutions to try to hold back the sea.
If it wants to save its flood-vulnerable communities, it needs to look beyond its borders and cooperate with other countries to cut climate-changing emissions and plan more sustainably.
"These (flood prevention) projects have been successful in protecting their areas, but the sustainability of their success is not guaranteed without an integrated plan that reduces carbon dioxide emissions and increases usage of green energy," he said.
"These are places that are expected to disappear entirely and this needs a major national and global plan to salvage them."