Peru's President Manuel Merino resigned Sunday, just five days after taking office, sparking celebrations in the capital Lima following street protests against him and the ousting of his popular predecessor.
Merino, 59, stepped down shortly after a crisis session of Congress called on him to quit power before 6pm (2300 GMT) or face censure.
"I want to let the whole country know that I'm resigning," Merino said in a televised address, a day after a police crackdown on protesters left at least two people dead.
Congress was expected to appoint a new president – the South American country's third in a week – in a new session on Sunday evening.
Thousands have taken to the streets in days of protests against Merino following the ouster of his predecessor Martín Vizcarra, who was impeached on corruption allegations on Monday.
Elections are scheduled for April 2021 and Merino was scheduled to leave power in July, when Vizcarra's mandate was to end.
Congress' ultimatum came after the health ministry said two protesters were killed on Saturday during a massive and peaceful march in Lima, which was repressed by police firing shotgun pellets and tear gas.
Merino said that to avoid a "power vacuum" the 18 ministers he swore in on Thursday would temporarily remain in their posts, though almost all had resigned in the wake of Saturday's crackdown on protests.
His resignation was greeted by noisy celebrations in Lima, with demonstrators taking to the streets sounding horns and banging pots.
Some lawmakers questioned the wisdom of removing Vizcarra in the midst of the coronavirus pandemic and a crippling recession.
The pandemic has hit Peru hard, with the politically-fragile country having the world's highest per capita death rate with nearly 35,000 fatalities, and GDP plunging over 30 percent in the second quarter.
"Congress must apologise to the country for such an irresponsible decision [to remove Vizcarra]," said lawmaker Mirtha Vásquez of the Frente Amplio party, one of 19 lawmakers who voted against his impeachment, as she arrived at the Congress.
Lima mayor Jorge Muñoz, from the same centre-right Popular Action party as Merino, also demanded the resignation of the president following Saturday's protest.
Lima Archbishop Carlos Castillo deplored the police crackdown in a statement to state television, adding that he had received news of the death of a third protester.
However, police reported two deaths, while the National Human Rights Coordinator indicated it was investigating whether there were four.
The Ombudsman's Office said the first fatality, a 25-year-old man, was killed by pellet shots to the head and face. At least 112 protesters were injured, the health ministry said.
The police tactics have been criticised by the UN and rights organisations such as Amnesty International since the protests began on Tuesday.
Thousands took to the streets on Saturday in opposition to Merino, the former Congress speaker who assumed office on Tuesday.
The mostly young protesters gathered in various cities to oppose what they call a parliamentary coup against ousted Vizcarra.
In Lima, police again used tear gas fired from helicopters to disperse protesters who were threatening to march towards the Congress building.
They carried signs reading "Merino, you are not my president" and "Merino impostor."
Vizcarra had broad support since succeeding Pedro Pablo Kuczynski, the former Wall Street banker who was forced to resign under threat of impeachment over corruption allegations in 2018.
Congress impeached and dismissed Vizcarra on Monday over allegations he took kickbacks from developers when he was governor of the Moquegua region in 2014, charges he denies.