For the last 20 years, Venezuela has been conducting an experiment into what happens when a government declares war on all forms of expertise. And in the last five years, the results have become clear: You get one of the biggest economic catastrophes in modern history.

Despite having the largest oil reserves in the world, Venezuela’s economy has shrunk by 47 percent since the end of 2013. That, to put things in perspective, is twice as bad as Greece has done during the euro crisis, and, if trends continue, will soon be worse than either Zimbabwe did during its hyperinflation or Ukraine did in the years after communism collapsed. Which is to say that, barring countries beset by civil war, Venezuela is on the verge of having suffered more economic damage than anyone else in recent times.

What’s made this even more painful, though, is that Venezuela also has the worst inflation in the world today. The International Monetary Fund, for its part, guesses that it will be 10 million percent by the end of this year, but it’s just that: a guess. Our best estimate is that it’s about 112,000 percent, not that that’s much consolation. The price controls that the government has used to try to deny this reality, meanwhile, have only led to the country being short on food and medicine — why stock your shelves if you’re forced to sell things at a loss? — and long on lines and violence. It’s an economic crisis that has begotten a humanitarian crisis that’s fueling a migrant one. About 3 million people, or 10 percent of the total population, have fled to neighboring countries such as Colombia.

How did a country that should have been so rich end up so poor? Well, there are two stories you normally hear, and neither is correct. The first is that this is just about oil. Venezuela’s economy, after all, depends on it, so it doesn’t exactly seem like a surprise that the one has collapsed when the other has, too. The only problem with this is that as true as it is, it isn’t true enough. All you have to do is look at Saudi Arabia. It’s no less reliant on oil, but it has managed to grow 11 percent the past five years. Something else, then, must be going on in Venezuela.

And if you listen to Fox News, you know what that’s supposed to be: socialism. The idea, as former New York mayor Michael R. Bloomberg put it, is that “radical redistribution” has inevitably killed Venezuela’s golden goose. If that were the case, though, why has a country such as, again, Saudi Arabia been able to spend a lot of its oil money on its people without suffering the same sort of fate? Or a country such as Denmark been able to raise taxes far above what Venezuela’s ever tried while still growing at a healthy clip? The answer, of course, is that socialism is not really to blame.

What has happened is that low oil prices have revealed the extent of the Venezuelan government’s mistakes, which had nothing to do with taxing the economy too much and everything to do with managing it too poorly. The simple story is that the government took over one sector of the economy after another — steel, mining, agriculture, to name a few — and got rid of people who were good at their jobs so they could bring in ones who were good at being loyal. This made production predictably crater, and things that used to be made at home suddenly needed to be bought from overseas.

The government could at least cover up how much of the economy had been hollowed out this way as long as high oil prices gave it the money it needed to buy things. But it was never able to cover up as much as it should have, because its oil industry was being hollowed out, too. The Chavistas, you see, had fired most of the experienced engineers who had been striking against them, forced out foreign companies that knew what they were doing, and generally treated the state-owned oil company as a piggy bank that they could take money out of without ever having to put anything back, even as oil production fell off for lack of investment. That’s why the government had to turn to the printing press to pay for things even when oil prices were in the triple digits, and has really had to now that crude prices have fallen so much the past few years.

The best way to think about the Chavista regime, then, is as an extremely shortsighted mafia. Instead of charging businesses for protection — nice factory you got here, be a shame if anything happened to it — the government simply looted them until there was nothing left. It tried to pretend this wasn’t happening by using some of its oil profits to give people homes and health care, and, when that wasn’t enough, printing the money it needed instead. But eventually it couldn’t even do that once those profits disappeared, and it had to print so much money that it became worthless.

And despite all this, there’s no guarantee that the Chavistas are going to lose their grip on power. Far from it. The military is staying on their side against the opposition. Why? Because as bad as the Chavistas have been for the economy, they’ve been kind of good for themselves and their cronies. It’s not just about the wealth they’ve expropriated. It’s that they’ve set up a system where they can make money off its destruction. For some of them, that’s meant using the machinery of the state for drug trafficking. For others, it’s been using the regime’s preferential access to dollars to make risk-free profits in the currency markets. But in any case, the story’s been the same: Ruin is working out just fine for them.

Which, when you think about it, might be the worst news of all. It means that this experiment in human misery may have a long way to go.