Late last week, president Joko Widodo of Indonesia told the AP that he’s fast-tracking a decade-in-the-making plan for a giant seawall around Jakarta, a city that’s sinking as much as 8 inches a year in places—and as seas rise, no less. Models predict that by 2050, a third of the city could be submerged. It’s an urban existential crisis the likes of which the modern world has never seen.

But deploying a seawall is a massive political and engineering problem in any country, to say nothing of Indonesia’s struggles with a literal underlying crisis: Jakarta’s people are pumping too much groundwater, and consequently the land is collapsing underneath them. If Jakarta can’t find a way to hydrate its people some other way, it’ll keep sinking, pulling that new seawall down with it. It’s a glimpse of a dark future for much of human civilization, which stubbornly clings to coasts around the world.

Think of Jakarta as sitting on top of giant water bottles, aka aquifers. Forty percent of its 10 million residents get their water from pumping, so they’ve been draining those bottles, which consequently collapse, leading to land subsidence. This, by the way, is not unique to Jakarta: California’s Central Valley has sunk by as much as 30 feet for the same reason. But because other nations have dealt with the problem, Jakarta knows how to fix it.

Matt Simon covers cannabis, robots, and climate science for WIRED.

“The big solution is water management, to stop groundwater pumping,” says Heri Andreas, who studies subsidence at the Bandung Institute of Technology in Indonesia. “But the problem in Jakarta is we're still struggling to find a replacement. And we're a developing country, so it makes it more complicated.”

The city has 13 rivers, for instance, but they’re all polluted. Desalination might help provide the city with fresh water, but it’s enormously expensive to run such plants. And Jakarta doesn’t do water recycling, so it could actually learn a thing or two from Singapore or even Los Angeles, of all places. “Of course if we don't stop the subsidence, the seawall will go down too,” says Andreas.

Complicating matters further, Jakarta is wrestling with serious inequality, with the least fortunate being shoved off to the most dangerous areas along the coast. Even worse, almost no one in Indonesia has insurance, a factor of both economics and cultural considerations.

So, does the Indonesian government eventually have to force those people to leave if the wall doesn’t work? And which is worse, the inequality that keeps them in danger or the devastation of uprooting them? “The equity impacts can cut both ways, in terms of not being able to move and also being told to move,” says Charles Lester, director of the Ocean and Coastal Policy Center at UC Santa Barbara.

This idea of retreat is not a popular one. We’re humans, after all, masters of the built environment. We must be able to engineer ourselves out of this pickle, and to say otherwise diminishes our dominance. But “managed retreat”—an engineered withdrawal from coastal areas, as San Francisco is doing to save very expensive wastewater infrastructure—might be a tough sell. “I feel like even in my own work, it's sort of a dirty word,” says Carter Smith, who studies coastal adaptations at Duke University. “I would say, on a global scale, we're certainly not talking about it enough, even in the scientific community.”

LEARN MORE The WIRED Guide to Climate Change

But let’s say you build your seawall. If the rate of sea level rise accelerates because of runaway glacial melting, which may well happen, your new wall may not be tall enough. Climate change is a flurry of terrifying feedback loops, after all. In fact, one feedback loop is burning this very moment: An increasingly dry arctic means an unprecedented number of fires are blazing there, releasing more carbon into the atmosphere, which further heats the planet and melts more ice.