Venezuela, the world’s most oil-rich nation, is currently also the world’s biggest economic basket case.

Coca-Cola has stopped Coke production because there is no sugar. International airlines—including Aeromexico last month (paywall)—are halting flights to and from Caracas because currency controls make it nearly impossible to ship profits back home. Venezuelans are looting supermarkets to feed themselves.

By late last year 73% of the population (pdf, Spanish) lived in poverty, up from less than half a year earlier, according to a survey by several Venezuelan universities. Meanwhile, inflation is set to close the year at more than 700%, and GDP to tumble by 8%, according to the IMF.

In the neat realm of economic theory, the solution is clear, say economists within and outside of Venezuela. Bring the market back into the economy. Get rid of price and exchange-rate controls, as well as subsidies. Get international help.

But that would essentially mean reverting 17 years of policies followed by president Nicolás Maduro and his predecessor, Hugo Chávez, to keep the ruling party in power. Worse still, the necessary rescue measures would brutally raise the cost of living, making life in Venezuela even bleaker than it is today.

Which means two things: One, Maduro is unlikely to do much to halt the spiral. And two, if and when a true reformist ever takes over, he or she will have to resort to some extremely unpleasant medicine. Here’s what the economists we consulted say it would take.

Brutal step #1: Abolish price controls

First, let’s understand how things got this bad.

The root of Venezuela’s distorted economy is its nearly 300 billion barrels (pdf) of oil reserves, or 18% of the world’s total. When oil prices are high, there’s profligate government spending; when prices take a nosedive, so does the Venezuelan economy.

“It’s like a shopaholic,” says Raúl Gallegos, author of the recent Crude Nation: How Oil Riches Ruined Venezuela. “You give them a credit card and they go crazy. At the end you have nothing.”

Reuters/Ivan Alvarado Venezuelans have failed to manage their oil wealth.

To Venezuelans, this boom and bust cycle is excruciatingly familiar. Today’s economic crisis is largely a repeat of the one in 1986, the last time oil prices tanked—except now the damage is arguably worse because the country’s oil dependence has increased. Back then oil made up around 80% of Venezuela’s exports; today it’s closer to 95%, because Chávez’s economic policies largely focused on distributing wealth, not creating it. From 2000 to 2015, the manufacturing sector contracted by 14% (Spanish), and agriculture and services such as restaurants and hotels by 9%, according to data compiled by researchers at Harvard University’s Center for International Development.

Even though the fallout of the previous oil crisis was what catapulted Chávez into politics, once in power he did exactly what his predecessors had: ramped up government spending and borrowed as oil prices climbed to record-high levels.

That was the source of Venezuela’s economic original sin. When the tsunami of petrodollars started fueling inflation, Chávez tamed it by artificially curbing prices of basic goods. That kept citizens happy, but it was devastating for the local industry. At the fixed prices, Venezuelan producers could no longer make a profit, so many shut down.

That didn’t affect the government much as long as the oil windfall flowed in, because it could afford to bring in whatever Venezuelans needed from abroad. But now, with Venezuelan oil at around $40 a barrel (Spanish) and old debts coming due, the government has drastically cut imports, leading to the shortages and looting.

Price controls have also spawned an expansive black market where goods fetch many times the official price. That costs the government precious resources to police.

Reuters/Mariana Bazo Supermarket shelves lay empty as the government curbed imports.

So the first step, say economists of all stripes (Spanish), is to get rid of price controls. Prices, of course, will jump. How much will vary by product, says Gallegos, the author. Another factor is whether officials release controls gradually and in conjunction with other needed policy changes (see below).

Still, hikes (Spanish) to price-controlled products in May offer a glimpse of how bad it could be. A kilo of the corn flour used to make the staple food, arepas, was marked up 900%, to 190 bolivars a kilo, while chicken increased by 1207%, to 850 bolivars a kilo. At the official fixed exchange rate, that would be some $38 per pound.

Brutal step #2: Free the bolívar

As he did with prices, Chávez fixed the exchange rate to prop up Venezuela’s currency, the bolívar. While cheap prices were a political tool to earn the support of the people, access to foreign currency became a way to get support from companies, says Gallegos. Supporters got dollars at official exchange rates, an indirect subsidy; detractors didn’t, choking their ability to import raw materials.

For multinationals, that has meant they can’t easily ship their profits back home. This has made doing business incredibly complicated and risky. Several international companies have either scaled back their operations there, or packed up their bags and left altogether.

Reuters/Carlos Garcia Rawlins Venezuela’s foreign exchange system has become so distorted that the same restaurant meal costs over $2,000 at the official exchange and $20 at the black-market rate.

So like price controls, currency controls have to be removed, economists say. Again, the degree of pain would depend on how the government goes about it. Lifting the controls from one day to the next would make the bolívar plummet, and the prices of imported goods, on which Venezuelans now depend, would shoot up.

Therefore, economists advocate for a more gradual release of the exchange-rate peg. To do that, Venezuela needs plentiful foreign-currency reserves to prop up the bolívar as it slumps. But the country’s reserves have been steadily shrinking since the collapse of oil prices in 2014. They now stand at at $12 billion, their lowest level since the mid-1990s, data from Venezuela’s central bank shows.

Another way to ease the effects of a weaker bolívar is to supplement the incomes of poor families to help them pay the higher prices. But that, again, would require cash Venezuela doesn’t have.

Venezuela could make things much easier on itself by coming up with a convincing plan to overhaul its economy, says Aldo Musacchio, a professor at Brandeis University’s international business school. That would encourage foreign investors to pour capital into the country, bolstering the bolívar. Argentina, which lifted its currency controls last year, has had some luck (paywall) with that, though Argentines have been hit hard by rising inflation.

But given the distorted state of the Venezuelan economy, even in the best case, it could take a couple of years for prices to stabilize, says Musacchio. That’s two years of people not knowing what they’ll be able to afford from one day to the next.

Brutal step #3: Abolish subsidies

To increase government revenue, experts say, Venezuela must start unwinding the policies that have made it an economic weakling. That means ratcheting back subsidies. Today, the government spends more on subsidizing electricity and gasoline than on healthcare and education, says Brett House, chief economist at Alignvest Investment Management.

Dismantling subsidies isn’t as simple as just redirecting money, though. It also means dismantling a patronage apparatus the subsidies created. They became a way for the government to reward its allies, regardless of how well they managed their businesses, leading to corruption and decay instead of stimulating growth. Chávez also nationalized a slew of firms in a variety of sectors, and didn’t run them much better. ”The productivity of these companies has been destroyed,” says House.

Reuters/Miraflores Palace Hugo Chávez’s drive to put the state at the center of all economic activity resulted in a less productive Venezuela.

Removing subsidies and forcing businesses to operate by market rules will no doubt result in painful cutbacks in a country that already has a 17% unemployment rate, according to the IMF. On the plus side, the higher prices brought on by brutal steps #1 and #2 should make it easier for companies to turn a profit. Reducing spending should also help shrink Venezuela’s gaping budget deficit, estimated at 20% of GDP at the end of last year.

Maduro’s administration has already started taking baby steps to address the current economic disaster. It’s pared down its bewildering foreign-exchange system from three different rates to only two: a fixed, artificially strong rate of 10 bolívars to the dollar for the purchase of basic goods, and a floating rate, currently around 630 bolívars to the dollar. He also announced gasoline price hikes for consumers, and is trying to renegotiate debt terms (paywall) with Venezuela’s creditors. But, most observers agree, Venezuelans are going to need aid from abroad to switch economic gears.

Brutal step #4: go begging

Some economists advocate (paywall) going for a loan to an international agency, such as the International Monetary Fund. That would give the country not only cash, but much needed expertise, as well as confidence that Venezuela will follow through with the harsh measures described above. As things stand now, the country has been essentially shut out of international credit markets.

There’s just one problem: Bringing in the IMF is politically a non-starter in Venezuela. The bloody clashes in 1989 known as the Caracazo were sparked by public anger over an IMF bailout that drove up public-transit prices.

Reuters/Ivan Alvarado Venezuela’s crisis is already generating social unrest, which makes it more difficult to implement the tough measures economists recommend.

So other experts are instead recommending doing what Venezuela has been doing all along: using oil as collateral to get more loans, and to help fund the government’s shortfalls. “Venezuela is in the economic emergency room, but thank God it’s not terminally ill,” said Francisco Rodríguez, a widely-followed Venezuelan economist, at recent forum. Terminal illness is insolvency, he added, and his country has plenty of resources below ground.

Others, however, argue that leaning so heavily on oil, even if it’s just a temporary measure to jumpstart the economy, could set off Venezuela on the same path that led to the current crisis. “The state becomes dependent on the extractive model and it goes deeper and deeper into that,” Edgardo Lander, a well-known Venezuelan sociologist, said back in 2014, well before the effects of the country’s latest bout of oil intoxication were fully apparent.

Either way, any rescue plan will need to be cautious and well-orchestrated to avoid a stampede of Venezuelans exchanging all their bolívars into dollars once the currency controls are lifted, or worse yet, another Caracazo. First though, there has to be someone in charge willing to implement changes, no matter how hard they are. “It’s as much a political problem as it is an economic problem,” says Reggie Thompson, a Latin America analyst at Stratfor, a risk-assessment firm.

And once it gets out of its latest oil-induced crisis, Venezuela needs to seriously deal with its oil addiction. A first step, says Gallegos, would be to follow the lead of places like Alaska, and lock away its oil windfall when prices are high to keep itself from spending it all. But that requires a degree of prudence and foresight no Venezuelan leader has shown in at least a couple of generations.