On a recent flight to Nicaragua, I found myself sitting next to a sergeant in the United States army and an American businessman seeking to open a sales office in Managua. If either of them had tried to visit Nicaragua in the 1980s, they wouldn’t have made it past the airport.

In those days Nicaragua was governed by the Sandinista National Liberation Front (FSLN), a leftist movement allied with Cuba and at war with the U.S.-backed Contra rebels. President Daniel Ortega proclaimed that “our revolution is profoundly anti-imperialist, anti-Yankee and Marxist-Leninist.” Ortega lost power in 1990 but returned to the presidency in 2006, where he remains today. This time, things are quite different.

“The government is really eager to bring foreign companies to Nicaragua,” said the businessman across the aisle from me. The sergeant, whose card says he works for “Office of Security Cooperation — Nicaragua,” told me, “Whenever the Nicaraguans ask the U.S. for military or security help, we try to respond.”

Ortega still calls himself a Sandinista. His rhetoric, full of scorn for “imperialists” and “global capitalism’s tyrannical dictatorship,” still recalls Fidel Castro and Hugo Chavez. But everything else seems to have changed. By forging alliances with his former enemies, he has built a regime that appears likely to remain in power for a long time.

The first step in Ortega’s reinvention was reconciliation with the Roman Catholic hierarchy that had opposed him during the Contra war. His principal Catholic enemy in the 1980s, Cardinal Miguel Obando y Bravo, became a fervent supporter after the Ortega government banned abortion without exception. Ortega cemented this alliance by taking advantage of the Cardinal’s private weaknesses. In a cable made public by Wiki Leaks, the American ambassador to Nicaragua reported the widespread rumor “that Ortega is blackmailing Obando y Bravo with information proving that the Cardinal fathered children with his secretary and that he has engaged in corrupt practices in his management of the private Catholic University.”

The second pillar of the new regime is big business. As an anticapitalist revolutionary, Ortega had confiscated hundreds of farms, factories and other assets. Many businessmen fled the country. Now Ortega counts them among his closest allies. He recently pushed a tax law through Congress giving a host of concessions to the wealthiest Nicaraguans and foreign investors. One provision allows the tax-free importation of yachts and executive helicopters. The flood of foreign investors now includes behemoths such as Cargill, the agro-industrial conglomerate that recently unveiled a “master plan” aimed at making it one of Nicaragua’s major food producers and distributors.

Third, and perhaps most important, among Ortega’s allies is Rosario Murillo — First Lady, chief of communications and universally acknowledged power behind the throne. While her New Age mysticism has attracted attention, critics are more concerned by her opaque style of government. Murillo rules by fiat and her decisions are rarely contradicted. Key decisions are always made in private, and some are never announced.