Reconstructing Venezuela will be a massive and arduous task. The country is like an intensive-care patient that has depleted all muscle and organ function in a struggle to stay alive: We have no cash reserves, staggering amounts of debt, no industry to speak of (outside of oil), our shelves are empty, and the people are starving.

When I ask economists for historical parallels, they tell me none exist in modern times. Our current hyperinflation—expected by one estimate to reach 2,300 percent in 2018—has been matched by only a handful of countries in the past 100 years, including post-World War I Germany, and Zimbabwe in 2008.

But even among these examples, Venezuela stands alone. We have no real industry apart from oil, there are few businesses, and we import nearly everything, including—shockingly—oil itself: This year, Venezuela must import up to 30 percent of its oil needs from other countries, because of how badly our refining capability has deteriorated. It is now common to see long queues for gasoline, a development that was unimaginable just a few years ago.

And yet, oil is our lifeline to recovery. Venezuela today holds 20 percent of the world’s estimated oil reserves: more than those of Kuwait, Russia, Qatar, Mexico, and the United States combined. Venezuela also has around 200 trillion cubic feet of gas reserves—the largest reserves in Latin America and the 8th largest in the world. Petroleum generates the vast majority of our economic activity, accounting for 95 percent of our exports and half of GDP.

Why, with such riches in the ground, is Venezuela on the brink of collapse? In a word: mismanagement. A succession of governments fell into the classic resource-curse trap of allowing easy proceeds to create economic distortions, displace important industries, and feed whip-sawing boom-bust cycles that destabilized the country.

More insidiously, our way of managing oil proceeds has encouraged an unhealthy rent-seeking relationship between the people and the state. The state maintained a monopoly on distributing the benefits of oil, feeding a relationship of dependency among citizens and private interests, who over time became accustomed to thinking of oil wealth as something the government provides, rather than as something they own.

This provided fertile ground for the emergence of the populist demagogue Hugo Chavez, who—taking advantage of a massive spike in oil prices beginning in 2002—used the windfall to extend the people’s dependence to unprecedented levels. The oil boom allowed the regime to buy votes and goodwill even as it seized, undermined, and dismantled competing facets of the economy.

By the time the windfall ended, independent institutions and businesses had been so weakened that, perversely, people became yet more dependent on the government, which could no longer afford to provide for them. The population was reduced to relying on the small favors the government could grant, translating to political dominance and oppression. And the further collapse of the economy under Chávez’s successor, Nicolas Maduro, has been strategically useful to his regime. An entire population is now in subsistence mode. It is hard to protest when it takes half a day’s search to track down basic staples.