Cuban president Fidel Castro welcomes Soviet leader Mikhail Gorbachev in Havana on April 2, 1989. (Robert Sullivan/AFP/Getty Images)
Opinion writer

“We have to warn the imperialists,” Fidel Castro thundered at a rally in Camaguey, Cuba, 30 years ago last week, “that they not create so many illusions . . . in reference to the idea that our revolution will not be able to resist a debate within the socialist community.”

He was alluding to the political upheaval sweeping the Soviet Union and Eastern Europe in the wake of reforms by Soviet leader Mikhail Gorbachev, who had recently visited Havana. Communists had just lost elections in Poland, a portent, many believed, of change in Cuba.

“Never!” Fidel cried. Even in the event of “a large-scale civil war in the U.S.S.R.,” even if the Soviet Union “disintegrated,” he pledged, “Cuba and the Cuban revolution would continue struggling and resisting.”

Seated among other foreign journalists a dozen yards or so in front of Castro, I could not quite believe what the 62-year-old dictator was saying.

Still facing a U.S. economic embargo, Cuba could not endure a cutoff of Soviet subsidies and the hardship it would bring. Refusing to bend to that reality, Castro recklessly courted his own downfall, either through a popular uprising or a fatal split in Cuba’s communist ranks.

Or so I thought: In January, the Cuban revolution finished its 60th year; in 2016, Castro died peacefully in his bed; his younger brother, Raúl, who succeeded Fidel atop the regime in 2006, has semi-retired. And a transition to a new generation of party leaders, including a few influential younger Castros, is proceeding.

There is a lesson here about the relationship between economic factors — often said to determine political outcomes — and the human factor, which may be what really counts.

George Orwell summarized the point in “1984,” attributing it to Big Brother’s shadowy nemesis, Emmanuel Goldstein. As long as a repressive regime avoids foreign conquest and retains “its own self-confidence and willingness to govern,” Goldstein’s fictional treatise noted, it can rule forever.

True, a regime could be undermined by its own mistakes, especially if it incubates “a strong and discontented” middle class. However, sheer will can offset that: “Ultimately the determining factor is the mental attitude of the ruling class itself.”

The mental attitude of Gorbachev was such that he lost confidence in the inefficient, repressive brand of communism in his country and tried to reform the system from within.

As Castro foresaw, Gorbachev’s economic and political liberalization heightened rather than resolved Soviet systemic contradictions, setting off a chain reaction that led to the U.S.S.R.’s collapse.

By the time he addressed that July 1989 rally, Castro had already exhibited his own very different attitude. He had carried out a purge during the previous two months, culminating in the televised show trial of former high-ranking officials. This July, in fact, marks the 30th anniversary of the execution of four of them in Havana.

And it marks the 25th anniversary of another long-forgotten mass death in Cuba, the drowning of three-dozen Cubans on July 13, 1994, when the hijacked tugboat in which they were attempting to escape Cuba’s increasingly desperate economic situation sank, under suspicious circumstances.

Many blamed the regime, and August 1994 turned into a time of street protests and genuine peril for Castro — which he skillfully exploited by allowing a mass exodus of more than 35,000 people to the United States aboard makeshift rafts and boats.

As I watched Cubans parade to the beach with their homemade vessels that summer, I again felt sure that the regime’s days were numbered. Actually, emigration served as an escape valve for pent-up discontent.

Over the next quarter-century, Castro and his successors would help political allies take over Venezuela, using its oil to replace their former Soviet supply; they would successfully manipulate their people’s desire for access to money, travel abroad and other privileges; and, in 2014, they would agree to a thaw with the Obama administration, which produced diplomatic recognition and a flood of U.S. tourism dollars but no political opening.

The Trump administration has reversed much of the Obama administration’s Cuba policy and tried to help Venezuela’s opposition force the Havana-backed regime into new elections.

Yet the government in Caracas still stands despite its people’s impoverishment. It, too, concedes nothing and survives by letting the discontented leave by the millions while imposing fierce repression on those who stay.

A great weakness of U.S. policy now, of course, is that President Trump expresses selective warmth toward certain dictators and clearly does not share the enthusiasm for universal human rights and democracy promotion that caused so many in the West to celebrate the peaceful liberal revolutions of 1989 — and to hope that they would spread to Cuba and beyond.

In the ruling circles of Havana and Beijing and Damascus and Pyongyang and Moscow, and probably Tehran, too, 1989 is remembered as something that happened to leaders who lacked the will to crack down, improvise — and wait out the West. If only it were clearer that they were wrong.

Read more from Charles Lane’s archive, follow him on Twitter or subscribe to his updates on Facebook.