Venezuela’s accelerating economic meltdown is turning into a full‐​fledged humanitarian crisis. For too many in that country, the pervasive shortages of food, medicine, electricity and other basic goods are making everyday life a nightmare. The chaos holds lessons about how socialism can turn even an extraordinarily endowed nation into a basket case.

The dictum attributed to Margaret Thatcher that the problem with socialists is that “they always run out of other people’s money” faced a unique trial in Venezuela. During the course of a decade and a half, the government received nearly $1 trillion in oil revenues. This was enough to mask the effect of hundreds of expropriations, stifling economic controls, and otherwise running the private economy into the ground.

Part of the windfall was spent on social programs, which temporarily improved some social indicators and made the regime popular among poor Venezuelans. But a couple of years ago, the then‐​minister of education admitted that the aim of the regime’s policies was “not to take the people out of poverty so they become middle class and then turn into escuálidos” (a derogatory term to denote opposition members). In other words, the government wanted grateful, dependent voters, not prosperous Venezuelans.

What defenders of the Bolivarian revolution have seldom acknowledged is that a significant portion of the oil revenues was simply stolen. It is difficult to specify an exact figure thanks to the government’s opaque finances, but two former ministers‐​turned‐​critics claim that it amounts to $300 billion — an estimate consistent with independent analysis. No wonder Transparency International ranks Venezuela alongside Haiti as one of the two most corrupt countries in the Western Hemisphere.

Thatcher’s axiom did eventually catch up with Venezuelan socialism. Even when oil prices were hovering above $100 per barrel, the government’s finances went increasingly into the red. Now that a barrel of Venezuelan crude is trading at only $26, the situation has reached a breaking point. External debt has gone up by 115 per cent in the last decade and inflation is out of control; the International Monetary Fund says it will reach 720 percent this year. The situation is so bad that the government recently had to use 36 Boeing 747 cargo planes to import five billion notes of its worthless currency.

Behind the macroeconomic figures is a deepening humanitarian crisis. The government lacks the dollars to pay for imports which, compounded with price controls and their devastating effect on production, has caused widespread shortages. People line up for hours only to find empty shelves in government‐​run supermarkets. Even if they’re lucky, they can only buy a few products — in return for which they must undergo fingerprint scanning under the country’s rationing system. A national poll found that the percentage of Venezuelans eating two or fewer meals a day increased by more than 10 percentage points last year. Looting is now a common occurrence.

The economic crisis is having a particularly nasty impact on health care. According to the Venezuelan Pharmaceutical Federation, only 20 percent of the drugs that doctors require are available. People must rely on social media to scout the country for medications for their loved ones. “Babies born prematurely are dying like little chicks” was a February headline of El Nacional, Venezuela’s last independent daily. It quoted a resident doctor saying that public hospitals are operating “under war conditions.”

The reaction of the government, when it is not jailing opponents or shutting down media outlets, has been farcical. It recently encouraged people to create “urban gardens” so they can grow their own food. President Nicolás Maduro even claimed that he had 60 laying hens. One man told NPR that he tried to follow the president’s example by buying 30 chickens, but he could not find feed for the birds, so his family ended up eating them all.

A recent YouGov poll showed that millennials in the United States favor socialism over capitalism. If Venezuela’s plight were a required case study in colleges across the country, they would certainly think twice.