FUVEMEH, Ghana — The tide is just starting to come in when David Buabasah begins nervously checking the waters creeping up the coastline toward his partially destroyed home. As the high tide mounts the steep shore of this small Ghanaian fishing village perched on a shrinking peninsula between the Atlantic Ocean and the Volta River estuary, he and other inhabitants prepare for the worst. “When the big waves come, they can easily kill you. Last week, the ocean took away part of my house while my family was sleeping inside,” says the 32-year-old fisherman, gesturing toward a crumbling brick wall and a pair of door frames, the only remains of his family’s compound. Growing stronger by the minute, the tide begins to push wave after wave into the village, pounding the dilapidated dwellings with unrepentant force. House walls collapse under the fury of the ocean, and huge pools of saltwater fill the center of town. Those whose houses are the closest to the shoreline can only watch as the waves carry away all of their belongings. Twenty years ago, Fuvemeh was a thriving community of 2,500 people, supported by fishing and coconut plantations that are now completely underwater. But in the past two decades, climate change and industrial activity — such as sand mining and the construction of dams and deep-sea ports, which trap sediments and prevent them from reaching the coastline — have accelerated coastal erosion here. Gradually but inexorably, the ocean has swallowed up hundreds of feet of coastline, drowning the coconut plantations and eventually sweeping away houses. For a time, villagers retreated, rebuilding destroyed houses farther away from the advancing shoreline. But eventually they ran out of land to fall back on: The narrow peninsula is now less than 1,000 feet across, and high tides routinely wash over the entire sandy expanse. The last trees have been uprooted by the waves and lie dead along the shore, a grim omen of what awaits fishermen like Buabasah, who have seen their livelihoods destroyed in the span of a single generation.

A young boy carries his two turkeys to save them from the flood caused by the rising sea level in Fuvemeh.

Fuvemeh is one of thousands of communities along the western coast of sub-Saharan Africa, stretching more than 4,000 miles from Mauritania to Cameroon, at risk of being washed away. Spurred by global warming, rising sea levels are causing massive erosion — in some places eating away more than 100 feet of land in a single year. Sea levels around the world are expected to rise by more than two-and-a-half feet by the end of the century, but they are expected to rise faster than the global average in West Africa, according to the West African Economic and Monetary Union. In a region where 31 percent of population lives along the coastline, generating 56 percent of total GDP, according to the World Bank, this is a potentially catastrophic problem.

“In West Africa, infrastructure and economic activities are centered along the coastal region, so as sea levels continue to rise, it threatens our very existence and source of income,” says Kwasi Appeaning Addo, a professor in the University of Ghana’s department of marine and fisheries sciences. “We are sitting on a time bomb.”

Togbe Agbavi Koffi, 60, is the chief of village of Agbavi in Togo. “The sea advances all year long,” he said. “It has devastated our villages and many of our people have already left.”

And it’s not just small fishing villages that are being threatened. Low-lying areas in Lagos, the Nigerian megalopolis that is the seventh-fastest growing city in the world, as well as in the Ghanaian capital of Accra, whose annual economic output is around $3 billion, are at risk of inundation. Already, both cities are grappling with more frequent — and severe — flooding than in the past. Low-lying areas of Accra now flood every year during the rainy season. Last year, at least 25 people died as a result.

The southern parts of Nouakchott, the capital of Mauritania, lose up to 80 feet of beach every year, and coastal erosion has already damaged several hotels in Gambia and Senegal, as well as vital water treatment facilities in Cotonou, Benin’s economic hub. The situation is the same in neighboring Togo, where last year the coast retreated 118 feet in some places, according to local authorities. On the outskirts of the capital, Lomé, rows of destroyed buildings line the beach in the town of Agbavi.

“The national route used to pass there, just beside my first and second house,” says Togbe Agbavi Koffi, the town’s 60-year-old chief, pointing to the faint outline of a highway that is now submerged deep in the ocean. “My third house is about to crumble into the sea as well. I would like to cry, but a chief cannot cry.”