Prologue. For the last century, Venezuela has been a major exporter of petroleum, and that has been the foundation of its economy as other productive activity withered in the face of fast money from oil. By the 1950s it had the highest per capita income in Latin America. In 1958 the last of the traditional military dictators was overthrown and replaced by a multiparty democracy that achieved considerable stability in the 1960s. That stability was grounded on steady revenues from petroleum that enabled the state to provide social services and infrastructure superior to those of its neighbors.

Act 1. Venezuela was a founding member of OPEC (Organization of Petroleum Exporting Countries) and benefited immensely from the boycott of the West in 1973 by the Arab oil producers such as Iraq and Libya. The boycott drove up world oil prices as Venezuela, not participating in the boycott, profited. Oil prices never returned to pre-boycott levels. This rise in revenues for Venezuela coincided with the election of Carlos Andrés Pérez as President of Venezuela.

Pérez chose to use this enhanced revenue stream to nationalize the petroleum sector, creating a state-owned corporation (Pedevesa) that would take charge of the oil fields and refineries previously owned by such multinational corporations as Shell and Exxon. Management remained in the hands of professionals in the field, but profits accrued to the state. Those enhanced profits were then used to finance a wide array of social programs (education, housing, health care, and others) intended to raise Venezuelans’ standard of living. A growing middle class emerged, but the majority of the population continued to lead precarious lives in poverty (literally overlooking affluent Caracas from their hillside slums).

This model persisted through the 1980s, but program costs rose steadily and petroleum revenues could not keep pace. State finances were increasingly weak by 1988, when Carlos Andrés Pérez was elected to another term on the promise that he would know how to restore prosperity. Instead, shortly after his inauguration he attempted to impose a massive austerity program that was greeted by riots in the streets.

Act 2. Pérez managed to hang on as president for several more years, but he confronted two military coups in 1992 and was forced to resign and flee the country before his term ended in 1993. One of the coups was led by Lieutenant Colonel Hugo Chávez, who became famous for his surrender speech in which he promised that the movement for democratic reforms was not over. He was sentenced to prison, but later released by Pérez’ successor, Rafael Caldera.

Caldera (1994-99) presided over a democratic system in crisis and an economy in serious decline. What had been a stable and affluent democracy was just a memory.

Act 3. Chávez easily won the presidential election of 1998, with a strong base among the urban poor who still constituted the majority of the population, and his movement controlled the Congress. He was thus able to implement a political takeover of Pedevesa, pushing out the professional managers and pulling most of the revenues out of the company to support his government’s extensive programs to raise living standards among the poor, and to organize them in support of his government.

With this political and financial foundation, Chávez gained the adoption of a new constitution based on what he called “Twenty-First Century Socialism” and a model of democracy that was distinctly majoritarian and less respectful of minority rights. Still, he did not attempt to establish a one-party dictatorship and he won a succession of competitive elections where the votes were honestly counted. Indeed, he did lose one election and acknowledged it.

The opposition consisted of members of the formerly dominant parties, middle class professionals whose affluent lifestyles were at risk, conservative military officers, businessmen whose profits were at risk, and conservatives in general. They had a hard time achieving unity, but could agree in general on a demand to get back to the old style liberal democracy and the old style political economy that had served them so well. Unable to crack Chávez’ popular base, the opposition could not win elections, even with the United States supporting them, overtly and covertly.

Although Chávez had complete control of Pedevesa and used its revenues to support his programs, he generally recognized the need to keep investing in the company to keep the oil flowing. But he failed — as every one of his predecessors had failed — to use the oil money to build a more balanced and self-sustaining economy. He was lucky to have high world oil prices throughout his tenure.

Act 4. When Chávez succumbed to cancer in 2013, he left Nicolás Maduro, his chosen successor, in charge of a fairly stable left-wing regime with a better financial foundation than most other countries of the region. But Chávez’ good fortune did not survive him. Petroleum prices went decisively down and stayed down. Maduro, without the means to sustain his government’s extensive social programs, did not dare to cut them for fear of losing his popular base. Even with outside support from Russia and China, and with Cuban medical personnel providing health services, the economy descended relentlessly into deep crisis, and the government into insolvency.

Maduro started losing some elections, most notably a parliamentary election that gave the opposition control of the unicameral legislature. Maduro’s response to that was to use his Supreme Court to strip the Assembly of its power. The opposition-controlled Assembly of course refused to recognize that move, and continued to meet. The opposition, doubting the integrity of the presidential election of 2018, decided to boycott it. Maduro was of course reelected. The Assembly’s president, Juan Guaidó, declared himself Provisional President in January of this year, on the grounds that Maduro’s reelection was illegitimate.

Today, Venezuela has an economy that doesn’t function and a population that will flee if given the chance. The chavista political order’s legitimacy is deeply contested by an opposition whose own legitimacy is also in question. If the opposition wins, their government will inevitably be the cat’s paw of the Trump administration. If Maduro survives, it’s hard to see how the country gets out of this hole.

There is no happy ending.