In the northern Senegalese city of Saint-Louis, excavators are ripping up the beach to lay giant blocks of basalt, in an eleventh-hour effort to keep the sea at bay.
When work is finished, a black sea wall will stretch for kilometres along the coastline of the West African country's former capital, famed for its colonial-era architecture.
Dire warnings about the risk of rising sea levels due to climate change are already a grim reality in Saint-Louis, where seafront residents are abandoning their homes to the encroaching Atlantic Ocean.
But the sea wall is a stopgap. And some are sceptical that the historic city of 237,000 people can be saved at all.
Saint-Louis has "already been wiped off the map," said Boubou Aldiouma Sy, a geography professor at the city's Gaston Berger University.
Its unique position -- near the mouth of the Senegal River, with both the swollen waterway and the ocean on its shorelines -- means that its long term existence has always been in doubt, he said.
"The role of man is to accelerate the process," Sy added.
European traders’ hub
Founded by the French on an island in the mid-17th century, Saint-Louis became a hub for European traders, playing an important economic and cultural role in the region.
It served as the capital of the French colony of Senegal until the capital moved to Dakar shortly before Senegal’s independence in 1960.
From the original island, the city spread on both sides, onto a long, thin sandy strip of land known as the Langue de Barbarie to the west and eastwards onto the mainland.
Its colourful, historic balconied houses and double-storied villas have helped make the island a UNESCO world heritage site and the city hosts a renowned annual jazz festival.
But Saint-Louis stands only a few metres above sea level.
Long a problem, floods have become more severe in neighbourhoods such as Guet Ndar, a packed fishing district where brightly painted wooden canoes line the shore.
Coastal erosion is also eating away at the shoreline.
Many locals have had little choice but to move to a displacement camp inland as their homes have been swallowed up by the raging sea, the erosion and the crumbling ground beneath them.
The sea barrier is Senegal's attempt to manage the compounding problems.
But experts point out that while it can protect against freak surges, it cannot stop the rising sea.
Mareme Gueye, a Guet Ndar resident, told AFP that all the suffering she'd experienced since childhood "has been caused by the sea".
Six of the seven rooms in her house are gone, washed away by the ocean.
In her one remaining room, she removed the door to ensure that no one gets trapped inside during floods.
Destructive flooding has increased since 2010, according to the 43-year-old, who said that she can no longer sleep at night for fear of the intemperate waters.
In one harrowing instance, floodwaters swept her parents from her house and dragged them out to sea.
They miraculously survived.
Free-for-all construction in Saint-Louis -- known as Ndar in the local Wolof language -- has worsened coastal erosion.
The city is a particularly acute example of problems common across several coastal metropolises in West Africa, Sy said, pointing to Ivory Coast's main city and economic hub Abidjan, or Guinea's capital Conakry.
Erosion is causing the coastline to recede by some 1.8 metres (yards) a year across the region, according to a 2019 World Meteorological Organization report.
Likewise, the UN's Intergovernmental Panel on Climate Change said this year that sea levels on the West African coast are rising by between 3.5 and four millimetres (0.14 and 0.16 inches) annually.
With its unique layout surrounded by water, Saint-Louis is on the front line.
Nearly two decades ago, an ill-fated attempt at flood control after heavy rainfall saw authorities widen a water channel on the Langue de Barbarie between the river and sea.
But from its initial four metres, the canal unexpectedly grew to several kilometres wide as the salt water of the Atlantic gushed into the river, causing further disruption to the natural order of things and transforming the landscape.
The encroaching sea has already caused severe damage.
Flooding in 2017 and 2018 left more than 3,200 people homeless -- about 1,500 of them now live in a displacement camp in Djougop, further inland.
The disaster prompted Senegal to begin building the sea wall in 2019, partly financed by France.
The project is worth some 100 million euros ($117 million) and also includes a rehousing programme.
Building is due to finish by the end of this year, when the colossal barrier will run 3.6 kilometres (2.2 miles) along the coast.
However, the project also requires home demolitions in a 20-metre-wide strip behind the barrier.
Between 10,000 and 15,000 people in total are set to be uprooted, said Mandaw Gueye, an official working on the project.
Some will end up in Djougop and nearby neighbourhoods where the World Bank is co-funding the construction of 600 homes, he said.
Other project officials stressed that the displaced would be compensated.
But residents appear decidedly unenthusiastic about the prospect of Djougop -- a bland expanse of blue-roofed bungalows built in the desert, far from the sea.
Their seaside fishing district is poor, and one of the most densely populated urban areas in Africa, but tales of the fate of those already displaced have circulated.
Fishermen in Djougop, whose livelihoods already are physically demanding, must rise even earlier in the morning to reach the distant sea.
Those fishermen who stayed on Guet Ndar often leave without them.
"They are very tired," says 65-year-old local resident Thiane Fall.
The sea barrier is a short-term emergency measure and not even designed to be impermeable.
The government says it is studying more durable solutions.
Sy, the geographer, suggested structures called groins, built perpendicular to the shoreline, which force sediment to settle in such a way as to reverse coastal erosion.
Ensuring coastal areas are lush with plant life can also slow the trend.
Alioune Badara Diop, one of Saint-Louis' deputy mayors, said these options remain viable.
But the government did not pursue them initially because of their "relatively high cost," he said.
He isn't convinced that his city has met its end, however, highlighting Senegal's nascent oil and gas sector and all its potential.
"We will have the means, and human ingenuity will make it possible to build structures that will protect the coast," Diop said.