Daniel Ortega has ruled Nicaragua for approximately 32 of the past 40 years—first as part of a five-man junta after the Marxist Sandinistas ousted the former dictator, Anastasio Somoza, in 1979, and later as president (from 1984 to 1990 and again from 2007 to the present). He has no intention of giving up his power anytime soon.

I’ve been told by numerous sources, including several former Ortega associates, that 1990 was a critical year in Ortega’s evolution as a dictator. That was the year Violeta Chamorro, widow of a highly respected newspaper editor who had crusaded against the Somoza dictatorship, defeated him in Nicaragua’s presidential election.

Chamorro was able to pull off a victory because Ortega, confident that most Nicaraguans supported the Sandinista revolution, failed to rig the election. That night he reportedly got a call from Fidel Castro, who is said to have told him: “Never forget this lesson: Once you gain power, you do not allow free elections because the Fascists might win.”

In recent days Ortega has shown the world how well he remembers that lesson. In power for the past 14 years, Ortega is running for a fourth consecutive five-year term and has taken his control of the election, planned for early November, far beyond the interference and manipulation that occurred in his two previous reelection campaigns.

Unlike the earlier campaigns, when he still retained some popular support, Ortega is now loathed by a large percentage of Nicaraguans and would likely lose against any of his principal opponents in a fair election. That’s why he began the process of rigging the election at the end of last year by legally limiting political rights, then deepened the rigging in May, when he packed the electoral oversight body with members of his party, the Sandinista National Liberation Front (FSLN), banned opposition organizations, and made it clear that no international observers would be allowed.

He has now arrested several presidential candidates, including his most serious rival, Cristiana Chamorro, whose mother defeated him in 1990. Other opposition figures, as well as prominent business leaders, also have been arrested on trumped-up charges.

These measures not only result from the lesson of 1990; they indicate that he learned a second key lesson in 2018: Brutal repression works.

That year Ortega and his wife, Vice President Rosario Murillo, faced massive protests around the country, triggered by an economic recession but really motivated by widespread opposition to years of one-party rule.

Many institutions that previously had not openly opposed Ortega, including the Catholic Church, now challenged him. Ortega understood the danger and unleashed a horrific wave of violent repression that killed an estimated 450 people, injured thousands, and sent numerous Nicaraguans to jail. He was eventually able to pacify the country.

He learned in 2018 that heavy repression works if you’re willing to take it as far as necessary, as long as the military backs you. And there has never been any sign that the military, tightly controlled by the FSLN with help from Cuban counterintelligence experts, is anything but loyal to him, thanks to the widespread corruption that the regime uses to enrich and reward senior military officials.

While U.S. sanctions against Sandinista leaders have been expanded—by coincidence, Secretary of State Antony Blinken was in Costa Rica when Chamorro was arrested—Ortega and his cronies have plenty of cash at their disposal, so the sanctions are not likely to have much effect. Ortega also knows he can count on support from Russia, Iran, and several left-wing Latin American governments, while many of the region’s center–right governments are distracted by the resurgence of militant leftists at home.

In short, the future looks bleak for the Nicaraguan people.

Ortega appears willing to go to any length to ensure his reelection in November. Let this be a warning for the leaders and people of other Latin American nations where the extreme left is trying to gain control by whatever means necessary: Once the thugs grab power, they do not let go.