In the small fishing village of Beddouza in western Morocco, locals have turned to the Atlantic to quench their thirst, using mobile desalination stations to combat the kingdom's persistent drought.
Since 2023, Morocco has built some 44 of these desalination stations, also called "monobloc" -- compact, transportable units that have come as a boon against the increasingly tangible effects of climate change.
The potable water is distributed with tanker trucks to remote areas in the country, currently grappling with its worst drought in nearly 40 years.
"We heard about desalinated water in other villages, but we never expected to have it here," said Karim, a 27-year-old fisherman who did not give his last name, gathered among dozens with jerrycans to collect his share of water.
Hassan Kheir, 74, another villager, described the mobile stations as a godsend, as groundwater in the region "has dried up".
Some 45,000 people now have access to drinking water directly from the ocean in Beddouza, about 180 kilometres (112 miles) northwest of Marrakesh, as a result of three monobloc desalination stations.
These units can potentially cover a radius of up to 180 kilometres, according to Yassine Maliari, an official in charge of local water distribution.
With nearly depleted dams and bone-dry water tables, some three million people in rural Morocco urgently need drinking water, according to official figures, and the kingdom has promised to build 219 more desalination stations.
Monobloc stations can produce up to 3,600 cubic metres of drinking water per day and are "the best possible solution" given the ease of distributing them, said Maliari.
For cities with greater needs, like Casablanca, larger desalination plants are also under construction, adding to 12 existing national plants with a total capacity of nearly 180 million cubic metres of drinking water per year.
By 2040, Morocco is poised to face "extremely high" water stress, a dire prediction from the World Resources Institute, a non-profit research organisation.
With coasts on both the Mediterranean Sea and the Atlantic Ocean, the North African country has banked on desalination for water security.
In Beddouza, the population is relatively better off than those in remote areas further inland.
About 200 kilometres east, in Al-Massira, the country's second-largest dam has nearly dried up.
The dam has filled up to an alarmingly meagre 0.4 percent, compared to 75 percent in 2017, Abdelghani Ait Bahssou, a desalination plant manager in the coastal city of Safi, told AFP.
The country's overall dam fill rates currently average 28 percent but are feared to shrink by 2050 as drought is expected to persist, according to the agriculture ministry.
Over that same period, official figures project an 11-percent drop in rainfall and a rise in temperatures of 1.3 degrees Celsius.
As the country grapples with the increasingly volatile effects of climate change, King Mohammed VI has pledged that desalination will provide more than 1.7 billion cubic metres per year and cover more than half of the country's drinking water needs by 2030.
The lack of water also threatens Morocco's vital agriculture sector, which employs around a third of the working-age population and accounts for 14 percent of exports.
Cultivated areas across the kingdom are expected to shrink to 2.5 million hectares in 2024 compared with 3.7 million last year, according to official figures.
In 2023, 25 percent of desalinated water was alloted to agriculture, which consumes more than 80 percent of the country's water resources.
Against this backdrop, authorities in Safi were in a "race against time" to build a regular desalination plant which now serves all of its 400,000 residents, said Bahssou.
The plant is set to be expanded to also provide water by 2026 for Marrakesh and its 1.4 million residents, some 150 kilometres east of Safi, Bahssou added.