On Oct. 20, Evo Morales ran for a fourth consecutive term as Bolivia’s president. That’s despite the fact that Bolivia’s constitution limits presidents to two terms in office — and despite the fact that he lost a 2016 referendum to alter those limits. Morales claimed that he has a human right to run for office indefinitely. And in a controversial ruling, the country’s highest court supported him.

The president’s attempt to stay in power revealed his “autocratic temptations”: a desire to speak and act on behalf of the entire “people” and to do so forever. That threatens the integrity of the country’s constitutional order.

Official results show Morales beating his main opponent, Carlos Mesa, by slightly over 10 percent — the threshold needed for Morales to win outright, without a runoff election. But his opponents — Mesa, his coalition (Civic Community) and his supporters — argue that Morales’s governing party, the Movement Toward Socialism (MAS), cooked the results to avoid a runoff.

Electoral authorities handled the vote tallying poorly and offered contradictory explanations for the day-long gap in the reporting of results. Moreover, preliminary reports from the Organization of American States’ (OAS) Electoral Observation Mission suggest that the electoral authorities’ actions do not inspire confidence. They recommend a runoff election. This aligns with Mesa’s charge of fraud — a charge he was prepared to levy regardless of the outcome. Still, actual evidence of fraud is scarce.

As the Morales government works with the OAS to audit the election, supporters on both sides protest in the streets, occasionally clashing, with some setting fires and looting offices. Morales claims that opposition protesters are trying to stage a coup. But many Bolivians are frustrated with and worried by his determination to stay in office. Meanwhile, Mesa’s call to supporters to defend democracy from fraud — well before the official counting was finished — escalated tensions dangerously.

Morales’s political movement in power

Morales became Bolivia’s first indigenous president in 2006 and was reelected in 2009 and 2014. He had been the leader of a largely indigenous coca growers union, which helped form his party, the MAS — intended to be a party “of movements.” The party has strong ties to a rural and urban social movements, serving as a formidable mass base.

The MAS became Bolivia’s only party with national reach. Still, as the economy slowed in 2014, so too did the MAS’s electoral strength. In February 2016, the opposition united and captured 51.3 percent of a referendum vote, just defeating Morales’s attempt to legalize his fourth candidacy.

That gave the MAS two choices: find a new presidential candidate — or look for legally questionable ways for Morales to run again. Without a viable successor, the MAS opted for the latter.

Several factors help explain Morales’s political longevity. He has led Bolivia into strong and sustained economic growth, remarkable reductions in poverty and one of the sharpest reductions of inequality in the region. Morales’s strong ties with social movements that represent people previously ignored and marginalized has kept his governing coalition united. Moreover, his opposition has been fragmented and tied to the upper classes.

What made the 2019 election so competitive?

But Morales mismanaged the government’s response to wildfires in Bolivia’s Chiquitanía region of Santa Cruz. Also, in Santa Cruz, Bolivia’s economic powerhouse, a growing autonomy movement demands greater fiscal autonomy and more room for market forces than Morales’s economic model allows. In 2008, Morales declared martial law and sent troops to fight that movement’s supporters. Confrontations between the two almost brought Bolivia to the brink of civil war. Morales’s loss of legitimacy after losing the 2016 referendum helped revitalize the movement, with important consequences for his electoral underperformance in that region.

Is Bolivia’s democracy in danger?

Our research, like others’, finds that in some key ways, Bolivia’s democracy has weakened. Morales barely respects constitutional checks and balances on presidential authority. Many former supporters worry about his concentration and abuses of power.

Of course, Bolivian democracy is fairly recent — and has long been flawed. It didn’t become stably democratic until 1985, when the three main parties negotiated power-sharing agreements that enabled presidents to govern. These agreements obscured the parties’ policy differences. As a consequence, Bolivians who didn’t support their positions had no voice in politics.

Morales has pushed Bolivian democracy to be more participatory and inclusive. Previously excluded groups — including peasants, indigenous peoples and members of urban-popular associations — now have representatives in elected and appointed offices, giving them power and influence.

Greater inclusion has led to an expansive social policy and increased social and economic equality — which has changed public perceptions dramatically. By 2017, public opinion surveys found that, out of all Latin American countries, Bolivia had the lowest population percentage to believe that the government was designed to benefit the powerful.

Still, Morales appears unwilling to cede power, and his party appears unwilling to cultivate a new leader. People fighting in the street are questioning the integrity of Bolivian elections and challenging Morales’s legitimacy. Democracy is a system in which parties lose elections, which Morales seems unwilling to allow.

The opposition framed the recent election in apocalyptic terms, arguing that defeating Morales meant a return to democracy — and that his reelection would consolidate dictatorship. Morales argued that winning would let him “deepen” democracy by continuing to promote policies that reduce social and economic inequality. Each side accused the other of endangering democracy by emphasizing different aspects of democracy. Amid increasing polarization, both aspects are in danger now.

Santiago Anria (@AnriaSantiago) is assistant professor of political science and Latin American studies at Dickinson College and author of “When Movements Become Parties: The Bolivian MAS in Comparative Perspective” (Cambridge Studies in Comparative Politics Series, 2018).

Jennifer Cyr (@policentrica) is associate professor of political science and Latin American studies at University of Arizona and author of “The Fates of Political Parties: Crises, Continuity, and Change in Latin America” (Cambridge University Press, 2017).