Security forces guard the entrance of a military building Sunday in downtown Caracas, Venezuela. (Carlos Barria/Reuters)

Can Nicolás Maduro hold on to power in Venezuela? That may turn largely on whether the military will stand by him. At Slate, political scientists Bruce Bueno de Mesquita and Alastair Smith argue the Venezuelan military will remain loyal as long as Maduro “can credibly promise to continue to pay his generals.”

We disagree. Our research — and that of others on Latin America, the Middle East and beyond — shows that while military leaders do consider their material interests, that’s not the only factor in deciding where to throw their support. Here are four major factors that shape whether the military will defect or defend.

1. Do the military elite have personal stakes in the survival of this regime?

Of course military leaders consider their own material interests. So long as the regime delivers high pay and access to business opportunities, whether clean or corrupt, these elites have strong incentives to stay loyal.

But politics also matter. In ethnically divided societies — which Venezuela is not — ethnic proximity may be important. The Syrian military’s Alawi units have stood by dictator Bashar al-Assad through all the bloodshed because their survival remains linked to Assad’s, given their common ethnic identity.

Further, appointing officers to high-level political positions, including cabinet appointments, can cultivate the political allegiance of the military elite. Today’s Brazil presents a classic example of this strategy, with newly elected president Jair Bolsonaro recently designating several generals to head key ministries.

Most important, if the military elite are implicated in a regime’s criminal behavior, that strengthens their loyalty. In researching how deeply Argentina’s military officers were involved in human rights atrocities during that country’s “Dirty War” from 1976-83, one of us learned how they made a pact never to betray the regime and reveal its dark secrets.

2. The military will assess the leader’s resolve and the likelihood of his survival.

If the military correctly calculates that the leader will prevail, then staying loyal will pay off. But if they believe the leader to be on his way out, why put their necks on the line?

For instance, in China, the military stood by Deng Xiaoping during the 1989 Tiananmen crisis — when tens of thousands of students demonstrated for democratic freedoms in Beijing’s Tiananmen Square — thanks to Deng’s success at projecting that he was fully in charge and had the support of all major sociopolitical forces. Deng was unwavering in his determination to repress the protests. Standing by Deng, then, was a good bet for the military elite.

In contrast, during the 1979 Islamic revolution in Iran, the military abandoned the shah because he appeared irresolute in his willingness to repress the opposition and because his serious illness (cancer) and his history of leaving town when things got rough made supporting him too risky.

3. Military elites are deeply concerned about the integrity of their institution.

Military leaders care about preserving discipline, hierarchy and especially unity. What social scientists call “institutional fracture” kills military effectiveness. The military leadership wields power only as long as its subordinates stay loyal. If the lower ranks refuse to follow orders, the armed forces cannot fulfill their central mission — safeguarding national security. Worse still, division within the ranks could trigger civil war. That’s why the military leadership will not stand by a regime that deeply divides its forces and threatens their defection.

[Trump’s challenge to Venezuela’s president could lead to a military occupation. Here’s why — and why that’s dangerous.]

4. Public opinion about the regime may nudge the military.

Military leaders also consider whether civil society and the public at large support the regime. If citizens generally perceive a regime as illegitimate, the military elite face a greater chance that junior officers or conscripts will defect. This is especially likely if the junior officers are poorly paid and identify with average citizens’ economic plight, and if conscripts are drafted from a socioeconomic cross-section of society. Defections are even more likely if civil society can mount large and peaceful popular protests, which don’t trigger the military’s impulse to repress in the name of order and security.

We saw this in Egypt’s 2011 popular uprising. Mid-ranking officers shared the economic struggles of the masses. Massive popular demonstrations were conducted carefully, avoiding violent provocation. Ordinary soldiers fraternized with civilians. The generals then chose to abandon Hosni Mubarak and support his ouster as president.

But the military need not side with the opposition. It could simply sit on the sidelines, neither supporting nor opposing protesters, as happened during the Color Revolutions in Eastern Europe between 2000 and 2004.

If that happens, leaders may marshal other security forces (variously named the republican guard, the national guard, the police). The regime’s fate then turns on whether these alternative forces can and will subdue the demonstrators. During the Tunisian uprising of 2010 that kicked off the Arab Spring, the police proved inadequate. Massive protests brought down the autocratic leader Zine el-Abidine Ben Ali. But in Iran in 2008, when huge crowds protested the regime’s “stolen elections,” the security forces known as the Basij got the job done, crushing the protests and preserving President Mahmoud Ahmadinejad’s rule.

[Venezuela’s instability has far broader implications. Here’s what’s at stake.]

What does all this suggest for Venezuela’s future?

On the one hand, backing Maduro has brought the military elite economic opportunities. For instance, the military runs PDVSA, the state oil company, and military officers profit from being involved in a lucrative government-run drug-trafficking network. Further, Maduro has promoted military officers to high political offices, figuring those officers will defend the regime because they have so much to lose if they fall out of office. Finally, Maduro has shown a resolute commitment to holding on to power, which means staying loyal could very well pay off.

On the other hand, soldiers and national guardsmen see firsthand — in their families, neighborhoods, all around — the nation’s dire economic suffering. With inflation running at nearly 1 million percent, pay raises aren’t really helping lower-ranking officers and the enlisted. And since Juan Guaidó — the head of the National Assembly and self-declared interim president — has offered amnesty for past human rights offenses to military leaders who leave Maduro, he’s shifted their calculations in his direction.

We don’t yet know whether civil society can mobilize large, multi-class, peaceful protests that will encourage the military to abandon the government. Nor do we know whether smaller police forces or militias will be strong enough to enforce Maduro’s reign should the military decide to stay quartered. But the logic of the military’s calculus is clear.

Eva Bellin is the Myra and Robert Kraft Professor of Arab Politics at Brandeis University and the Crown Center for Middle East Studies.

David Pion-Berlin is a professor of political science at the University of California at Riverside and co-author of “Soldiers, Politicians, and Civilians: Reforming Civil-Military Relations in Democratic Latin America” (Cambridge University Press, 2017).