Bolivian President Evo Morales has stepped down hours after agreeing to call new elections, the New York Times reports.

The plan to hold new elections stemmed from a damning report from the Organization of American States (OAS) released Sunday that found “clear manipulations” of the voting process during the country’s October 20 elections.

Morales has faced mounting pressure in recent weeks after squeezing out an electoral victory after 24 hours of silence from electoral officials on election night. Questions over how Morales went from facing a runoff before that period of silence to winning the election outright caused leading opposition groups to allege election fraud and demonstrations to unfold in the streets. At least three people have died during the protests.

The OAS report found the results had indeed been tampered with: “The manipulations to the [electoral] computer systems are of such magnitude that they must be deeply investigated by the Bolivian State to get to the bottom of and assign responsibility in this serious case,” the OAS report read.

The OAS recommended Bolivian officials dissolve the existing electoral body, which has been accused of being run by Morales supporters, and hold another election.

Morales said Sunday that he’d abide by those recommendations. Following calls for his resignation by members of the armed forces, opposition leaders, and the public, Morales announced his resignation Sunday evening.

The decision follows weeks of raucous antigovernment protests across the country. Demonstrators have burned down the headquarters of local election offices, set up blockades, and paraded a mayor barefoot through the streets after cutting her hair and showering her in paint.

On Saturday, police forces refused to crack down on the protests and the military refused to restore order in their place, releasing a statement saying, “We will never confront the people to whom we have a duty and we will always ensure peace, coexistence and the development of our homeland.”

Sunday, General Williams Kaliman told reporters, “After analysing the conflicted domestic situation, we ask the president to resign his presidential mandate to allow for pacification and the maintaining of stability, for the good of our Bolivia.”

And that resignation was met by widespread celebration:

Celebrations in La Paz #Bolivia after Morales announces his resignationpic.twitter.com/pWCPgkLbQ6 https://t.co/cMUkkef3UP — Amichai Stein (@AmichaiStein1) November 10, 2019

Protesters were also frustrated with Morales’s efforts to change the constitution

Protesters’ concerns about Morales, Latin America’s longest-standing leader, began well before the October election.

Morales is a former union leader who became Bolivia’s first indigenous president, winning election in 2006. He came to power alongside a wave of leftist candidates in Latin America.

Under his leadership, lawmakers put together a new constitution allowing a sitting president only one consecutive reelection. Morales called for another election in 2009, won it, and argued it was his first election under the new government — allowing him to run again in 2014.

With critics arguing Morales had already illegally won reelection twice, Morales called for a referendum in 2016 asking to change the constitution so that presidents would be allowed three consecutive terms. Voters rejected it, but Morales convinced the country’s top court (packed with his supporters) it was legal to let him run, arguing term limits constitute a human rights violation.

Going into the 2019 election, polls indicated Morales wouldn’t be able to receive enough votes to avoid a runoff. A candidate for president in Bolivia needs at least 50 percent of the vote to win, or failing that, a 10 percentage point lead on their nearest rival. Early vote counts indicated Morales would fail to meet either criteria, and as publicly available results seemed to increasingly confirm this, the electoral council abruptly stopped counting votes.

A full day later, they announced the results: Somehow, Morales had barely surpassed the amount of votes necessary to avoid a runoff against former President Carlos Mesa, his closest competitor. Mesa called that result a “shameful and crude alteration of the result of our vote” and the OAS said it “generates loss of confidence in the electoral process.” The European Union, United Nations, United States, Brazil, Argentina, and Colombia agreed.

Thousands saw the results as clear election fraud and took to the streets, reportedly shouting slogans such as, “No, and no, I don’t want to live in a dictatorship like the one in Venezuela.” The protests make Bolivia the latest Latin American county to become enveloped in demonstrations, as unrest continues in Chile and was recently resolved in Ecuador.

That’s a result of a variety of factors, Foreign Policy’s Christopher Sabatini and Anar Bata write, including economic downturns and frustrations over political promises collapsing. The crux of the issue though, they argue, is broad distrust of politicians regardless of party affiliation. A study from Vanderbilt University found that more than 80 percent of people across the region think more than half of their politicians are corrupt — in Bolivia, only around 16 percent trust political parties.

It’s not clear yet when the public in Bolivia will have another chance to choose their president. Nor is it clear who the public will have to choose from. Mesa has signaled he plans to run. And Morales will be watching from the sidelines.