In the early 1980s, Saudi Arabia embarked upon a bold project: It began to transform large swaths of desert landscape into wheat farms.

Now, “desert agriculture” isn’t quite the oxymoron it might sound like. These arid zones offer ample sunlight and cool nights, and harbor few crop-chomping insects, fungal diseases, or weed species. As long as you can strategically add water and fertilizer, you’ll generate bin-busting crops. And that’s exactly what Saudi Arabia did. As this Bloomberg News piece shows, the oil-producing behemoth grew so much wheat for about two decades that “its exports could feed Kuwait, United Arab Emirates, Qatar, Bahrain, Oman, and Yemen.”

But starting in the mid-2000s, Saudi wheat production began to taper off. Soon after, it plunged. This year and from now on, the country will produce virtually no wheat, and instead rely on global markets for the staple grain. What happened?

In short, to irrigate its wheat-growing binge, the nation tapped aquifers that “haven’t been filled since the last Ice Age,” Bloomberg reports. And in doing so, it essentially drained them dry in the span of two decades.

In an April 2015 piece, the Center for Investigative Reporting’s Nathan Halverson brought more details. He writes that the first sign of Saudi agriculture’s water crisis began in the early 2000s,when long-established desert springs—ones that had “bubbled up for thousands of years from a massive aquifer system that lay underneath Saudi Arabia”—began to dry up. It had been “one of the world’s largest underground systems, holding as much groundwater as Lake Erie.” Here’s Halverson:

In the historic town of Tayma, which was built atop a desert oasis mentioned several times in the Old Testament, researchers in 2011 found “most wells exsiccated.” That’s academic speak for “bone dry.” The once-verdant Tayma oasis that had sustained human life for millennia—archaeologists have found stone tablets there dating back 2,500 years—was drained in one generation.

In the meantime, farmers’ wells, too, began to go dry, and they had to drill them ever-deeper to keep the water flowing. By 2012, fully four-fifths of the ancient aquifer had vanished; and the Saudi government had begun to reconsider its make-the-desert-bloom ambitions, which have now turned to dust.

Here in the United States, we’ve followed a similar strategy for fruit, vegetable, and nut production, concentrating it in arid regions of California, irrigated by diverting river water over great distances, and, like the Saudis, tapping massive ancient aquifers. But climate change means less snow to feed rivers and thus to water farms—and more reliance on those underwater reserves. In California’s vast Central Valley, a major site of U.S. food production, fully half of wells are at or below historic lows, according to the U.S. Geological Survey. It’s impossible to know when the region’s aquifers will go dry, because no one has invested in the research required to gauge just how much water is left. But the trend is clear. In large swaths of the region, the land is sinking at rates up to 11 inches per year as underground water vanishes, USGS reports. The raiding of the region’s water reserve is part of a decades-long trend, USGS makes clear, made worse, but not caused, by the current drought.

Two other California regions are significant suppliers to the national food market: the Salinas Valley, known as the “salad bowl of the world”; and the Imperial Valley, which specializes in fresh winter produce. They, too, face severe long-termwater trouble.

Unlike their Saudi peers, US policymakers don’t have the luxury of waiting until the water runs out and then simply shifting to a reliance on imports—our population is more than ten times larger. One idea for what to do instead: Enact policies that boost vegetable production in other, more water-rich regions, including the Midwest and South—a process I have dubbed de-Californiacation. To bolster themselves, they may want to ponder what’s scribbled on the ruins of a vanished desert kingdom, as imagined by the Romantic poet Shelley: “My name is Ozymandias, King of Kings/Look on my works, ye mighty, and despair!”

This story was originally published by Mother Jones and is reproduced here as part of our Climate Desk collaboration.