Bolivia will vote for a new president on May 3, a step officials hope will end months of political chaos in the impoverished South American country.

“It will be a crucial election for the future of Bolivia’s democratic system,” Salvador Romero, the recently named president of the country’s election tribunal, told The Washington Post on Friday after the announcement.

Bolivians voted for president in October, and the tribunal declared socialist President Evo Morales the winner of a fourth term. But the opposition claimed fraud, an Organization of American States audit found “clear manipulation” of the vote, and protesters began burning the homes of government officials. The heads of the armed forces and police withdrew their support, and Morales resigned and fled the country.

Jeanine Áñez, a previously obscure second vice president of the Bolivian Senate from an opposition party, declared herself interim president and was quickly recognized by the United States. Morales and his supporters have described the sequence of events as a coup.

Romero said the election tribunal is working to fix problems with vote counting and the computer system that the Organization of American States says allowed previous elections to be manipulated. The United Nations is offering technical assistance and the European Union is expected to send an observation mission.

Morales’s Movement Toward Socialism party, or MAS for its initials in Spanish, retains a majority in Congress. Áñez’s most urgent challenge has been to negotiate an agreement with MAS on new elections, even as her interim government pursued the arrest of Morales and other top officials for crimes it alleges they committed in office.

“The announcement of a date is a clear sign that the transitional government is achieving its objectives: pacifying the country and organizing a new vote,” Bolivian political analyst Jorge Dulon said. “It means the end of a long crisis, and from now on the political situation will normalize as political forces regroup, choose candidates and campaign.”

Morales, who served as president for nearly 14 years, is in Argentina under the Peronista government of Alberto Fernández. He has said he won’t run in the May election but will manage the MAS campaign. Áñez’s government has warned him against returning to Bolivia.

The weeks after Morales’s resignation in November saw looting, arson and other violence in Bolivia’s principal cities. Áñez, who said her only priority as interim president was to set new elections, was accused of persecuting political opponents, appealing to racism against the indigenous Bolivians who have formed Morales’s base and offering immunity to members of the security forces who killed protesters.

But the sides eventually passed a law approving elections in 2020 under a completely new elections authority: seven magistrates of the national tribunal and members of local tribunals in nine departments. The magistrates were named over the past two weeks. The law prevents Morales and Áñez from running.

Romero announced the election date in a news conference in La Paz. He said three months was a short period to organize an election under the best of circumstances but is even shorter given the technical problems that need to be fixed to guarantee a clean vote.

“The future of Bolivia depends on these elections being completely transparent and reflecting the will of the people beyond any doubt,” he said.

It will be Bolivia’s first presidential election since 1997 in which Morales is not running. MAS has not nominated a candidate; Morales hosted party members in Bueno Aires over the weekend to discuss contenders and strategy.

In Bolivia, he faces an arrest warrant for alleged sedition and terrorism. But he vowed in an interview with Reuters to return by Christmas.

Morales has been credited with significantly reducing extreme poverty in one of Latin America’s poorest countries. But he’s also accused of concentrating power and growing increasingly authoritarian.

He won three elections by landslides and might still be the country’s most popular politician. But he antagonized voters, including some supporters, when he held a referendum in 2016 seeking to sidestep the constitution and run for a fourth term. He lost that vote, but then won a ruling from a friendly Supreme Court that allowed him to run anyway — alienating still more Bolivians.

Morales was widely seen as needing to win the first round of voting in October, when the opposition vote was divided among multiple candidates. An opposition united behind a single anti-Morales candidate in a head-to-head runoff was seen as likely to oust the longtime president.

When the electoral tribunal said Morales narrowly exceeded the 10-point margin he needed to avoid a second round, Bolivia descended into the chaos that drove him from the country.

Carlos Mesa, the center-right former president who finished second to Morales in the October vote, has said he will run again in May. Luis Fernando Camacho, a right-leaning opposition leader from Santa Cruz, the country’s biggest city, has also announced a run.