LIMA, Peru — Peru’s political crisis appeared on the verge of resolution Monday as Congress cleared the way for an elder statesman and consensus candidate to become the country’s third president in a week.

People waved the nation’s red-and-white flag and blared horns on the streets of Peru’s capital as Francisco Sagasti of the centrist Purple Party was selected as the new president of Congress.

The 76-year-old engineer has not yet been sworn into office but as head of Congress becomes the nation’s chief of state by default. Peru currently has no president or vice president, making him next in line.

It will now fall on Sagasti to heal a nation bruised by a week of upheaval.

“What’s at stake is taking a first step toward rebuilding confidence between the people and the state,” said Samuel Rotta, president of the Peruvian chapter of Transparency International.

Applause erupted in the legislative palace as Sagasti clinched the required majority vote. A respected academic, he has also spent decades consulting government institutions and held a post at the World Bank. Shortly after the vote, he took an oath to become Congress’ president.

“We will do everything possible to return hope to the people and show them they can trust in us,” he said in his first remarks.

The Latin American nation’s political turmoil took a chaotic turn Sunday when interim leader Manuel Merino quit and Congress couldn’t decide on his replacement. That left Peru rudderless and in crisis less than a week after legislators ignited a storm of protest by removing President Martín Vizcarra, an anti-corruption crusader highly popular among Peruvians.

Using a 19th-century-era clause, legislators accused Vizcarra of “permanent moral incapacity,” saying he took over $630,000 in bribes in exchange for two construction contracts while governor of a small province years ago. Prosecutors are investigating the accusations, but Vizcarra has not been charged. He vehemently denies any wrongdoing.

The move outraged many in Peru, who denounced it as an illegal power grab by a Congress full of inexperienced politicians looking out for their own interests. Half of the lawmakers are under investigation for potential crimes, including money laundering and homicide. Vizcarra wanted to do away with their parliamentary immunity – a move popular with Peruvians but not with the legislature.

Merino, a little-known rice farmer, was sworn into office last Tuesday as hundreds of Peruvians protested nearby. He promised to keep in place a scheduled presidential election in April. But his Cabinet appointments irked many, and a heavy-handed response by police fueled anger.

Peru has much on the line: The country is in the throes of one of the world’s most lethal coronavirus outbreaks and political analysts say the constitutional crisis has cast the country’s democracy into jeopardy.

“I think this is the most serious democratic and human rights crisis we have seen since Fujimori was in power,” said analyst Alonso Gurmendi Dunkelberg, referring to the turbulent rule of strongman Alberto Fujimori from 1990 to 2000.

A network of human rights groups reported that 112 people were injured in Saturday’s protests from projectiles, batons and inhaling tear gas. Two died – Jack Pintado, 22, who was shot 11 times, including in the head, and Jordan Sotelo, 24, who was hit four times in the chest near his heart.

“Two young people were absurdly, stupidly, unjustly sacrificed by the police,” Peruvian writer and Nobel laureate Mario Vargas Llosa said in a recorded video shared on Twitter. “This repression – which is against all of Peru – needs to stop.”

The protests rocking Peru were unlike any seen in recent years, fueled largely by young people typically apathetic to the country’s notoriously erratic politics. They come a year after a wave of anti-government demonstrations around Latin America demanding better conditions for the poor and working class.

The unrest comes as Peru grapples with the world’s highest per-capita COVID-19 mortality rate and one of Latin America’s worst economic contractions. The International Monetary Fund projects a 14 percent decline in GDP this year.

In his speech before Congress, Sagasti recognized the deep wounds Congress must work to repair before the upcoming election. He and the other members of the minority Purple Party bloc were among only 19 of 130 lawmakers in Congress to vote against Vizcarra’s removal. Wearing a black face mask and a purple tie, he called on lawmakers to work together to ensure that Peruvians feel recognized by an institution few currently trust.

He also paid homage to two young men who died during the protests.

“We can’t bring them back to life,” he said. “But we can through Congress, and the executive, take action so this doesn’t happen again.”

Comments are not available on this story.