Emad Attiah Ramadan has started planting rice on his 12-acre (5 hectare) plot on the edge of the Egyptian city of Damietta, giving up on tomatoes that would no longer grow well in the increasingly saline soil near the Mediterranean coast.
Rice sells for less but the irrigation used to cultivate it helps cleanse the earth of salt, allowing it to grow, he said, picking wild grass from his soil and checking for signs of saline build-up.
Ramadan is one of tens of thousands of farmers racing to adapt to encroaching salinity in the Nile Delta, a densely populated and fertile triangle of green that fans out towards the sea north of Cairo and accounts for more than a third of Egypt's agricultural land.
"If you leave the land 10 days without watering it, you'll find salt on the surface," he said.
A parched yellow field bordering his plot was left barren due to salinity, and he tried using chemicals to little effect: "Every year it gets worse."
Rising salinity in the Delta has multiple causes, experts and farmers say, including overextraction of groundwater and excessive use of fertilizers and pesticides.
But they say it is being made worse by climate change, which has already raised sea levels and temperatures in Egypt, and is the subject of the global COP27 United Nations talks the country is hosting this week.
The summit in Sharm el-Sheikh includes plans to help 4 billion people living in vulnerable areas withstand the impacts of global warming, along with setting tougher goals on planetary warming emissions.
For the farmers of the Delta, options for adaptation range from creating raised beds, or linear mounds of earth, to improve irrigation efficiency and drainage, to using new seed strains, said Aly Abousabaa, head of the International Center for Agricultural Research in the Dry Areas (ICARDA).
Wael El Sayed, a farmer in the east of the Delta near the city of Zagazig, said raised beds had helped save fertilizer and water, and had doubled productivity for his wheat crop.
But others struggle to treat and rinse the soil, as they experiment with new crops or rotations.
Near Sidi Salem, some 28 km (17 miles) south of the sea and near the centrepoint of the northern Delta, Ibrahim Abdel Wahab, an agricultural engineer managing lands for 15 smallholder farmers, pointed to one plot pocked by patches of bald earth and cotton plants browned by salt burn.
Around a decade ago, tomatoes, cucumbers, melons and pineapples were grown on the land, but now more resilient cotton, beetroot and rice are planted in rotation. Irregular rainfall and a lack of fresh water for irrigation have made farming harder, he said.
Abdel Wahab said that because of the salinity, he needs to sow double the amount of seeds and use extra fertilizer to achieve normal crop density, but productivity still falls short.
Egypt, with a population of 104 million, is heavily dependent on imported food, and is typically the world's biggest importer of wheat. Its agricultural production is largely limited to the wider Nile Valley, where water can be scarce and authorities struggle to stop people building on arable land.
Globally, Egypt is the fifth most vulnerable country to the economic impact of sea level rise on cities, with risks to agriculture and drinking water from inundation, erosion, and saltwater intrusion, a World Bank report published this month said.
Yields for food crops in Egypt are expected to drop by more than 10% by 2050 due to higher temperatures, water stress and increased salinity of irrigation water, according to a paper published last year by the International Food Policy Research Institute (IFPRI). Some studies suggest the impact in the Delta could be much higher.
"IT WILL GO DEEPER"
Sea levels have been rising by 3.2mm annually since 2012 in Egypt, threatening to flood and erode the Delta's northern shore and pushing saltwater further into the soil and the groundwater that farmers use for irrigation. Hotter temperatures accelerate evaporation, further concentrating the salt.
Over the past 30 years, temperatures in Egypt have increased by 0.4 degrees Celsius per decade, according to data from the University of East Anglia's Climatic Research Unit. The Intergovernmental Panel on Climate Change (IPCC) data shows North Africa warming by 1.5 degrees Celsius by mid century, relative to a 1995-2014 baseline.
Scientists say salinity varies from place to place and the exact contribution of climate change is hard to measure.
But it is already affecting 15% of the Delta's best arable land, according to the United Nations Food and Agriculture Organization (FAO), and is set to push further south.
"With time, with the sea level higher, that line of salinity will go down into the Delta. It will go deeper," said Mohamed Abdel Monem, a FAO senior advisor.
One study published last year in the journal Sustainability calculated that 60% of a 450km square area in the northeast of the Delta would be negatively affected by rising groundwater linked to sea level rise by the end of the century.
Sea water intrusion and salinity also threaten the Mekong Delta in Vietnam and the Ganges-Brahmaputra Delta in Bangladesh.
It is particularly challenging in the Nile Valley because of the arid, desert climate, said Claudia Ringler, a water resources and agricultural policy expert at IFPRI.
"You have to do much better job in a place like the Nile Delta because the water just evaporates quickly," she said.
Adaptation has limits. Rice cultivation helps wash the soil, but the government has imposed restrictions on the crop in parts of the Delta to conserve scarce water.
Near Mansoura, north-east of Cairo and about 70km (43 miles) from the coast, farm manager Hossam el-Azabawy said that even for a more resilient crop like beet, yields can drop by more than half in areas affected by salinity.
On some of the land he farms he has now turned to cotton, which has deeper roots that reach down to less saline soil. He has experimented this year with a new strain of rice that gives an 18% higher yield, in fields of cracked earth caked with salt.
"There is no quick, radical fix for salinity. It needs a lot of work," Azabawy said.