The dizzying series of events led to Vice President Dina Boluarte becoming Peru's first woman president.
Peru's leftist president Pedro Castillo was Wednesday ousted by lawmakers and arrested after trying to dissolve the South American country's Congress in a move widely condemned as an attempted coup.
The dizzying series of events in a country long prone to political upheaval resulted in even more history, with Vice President Dina Boluarte later becoming Peru's first woman president.
The day of high drama began with Castillo facing his third impeachment attempt since the former rural school teacher unexpectedly won power from Peru's traditional political elite 18 months ago.
In a televised address, the 53-year-old announced he was dissolving the opposition-dominated Congress, installing a curfew, and would rule by decree for at least nine months.
As criticism poured in over the speech, lawmakers defiantly gathered earlier than planned to debate the impeachment motion and approved it with 101 votes out of a total of 130 lawmakers.
Castillo left the presidential palace after the vote with the intention of seeking asylum in Mexico's embassy before he was arrested, according to a police report published by local press.
After his arrest was officially announced, a source in the attorney-general's office told AFP that Castillo was being investigated for "rebellion."
Boluarte took the oath of office within two hours of the impeachment vote, donning the presidential sash in front of Congress.
During the ceremony, she said "there was an attempted coup by Mr Pedro Castillo that did not receive any support in the democratic institutions or out in the streets."
She said she intends to serve out the rest of Castillo's term, until July 2026.
A 60-year-old lawyer and mother, Boluarte had become one of the Castillo government's best-known faces due to her position as Minister of Development and Social Inclusion, a post she held simultaneously with the vice presidency up until two weeks ago, when Castillo reshuffled his cabinet a fifth time.
Castillo was transferred later Wednesday to a police facility in east Lima, where graft-convicted former president Alberto Fujimori — himself removed by Congress in 2000 — is serving out his sentence.
Peru is no stranger to political instability: it is now on its sixth president since 2016 and during one five-day period in 2020 had three different presidents.
Against that chaotic backdrop, Castillo came out of seemingly nowhere to narrowly win the June 2021 runoff election against right-wing Keiko Fujimori, the daughter of the convicted former president who herself faced charges of corruption.
Born in a small village where he worked as a teacher for 24 years, Castillo was largely unknown until he led a national strike in 2017 that forced the government to agree to pay rise demands.
After his election, allegations against Castillo quickly flooded in.
He is facing investigations into alleged wrongdoing ranging from graft and obstruction of justice to plagiarising his university thesis.
Castillo and his lawyers have long argued the probes are part of a plot to unseat him.
Searching for more evidence in its corruption probe, investigators from the public prosecutor's office entered the government palace Wednesday night to search the presidential chambers.
Hundreds of protesters for and against Castillo gathered in front of Congress Wednesday.
"We are tired of this corrupt government that was stealing from day one," said 51-year-old Johana Salazar.
Ricardo Palomino, 50, a systems engineer, said Castillo's attempt to dissolve parliament was "totally unacceptable and unconstitutional. It went against everything and these are the consequences."
But retired soldier Manuel Gaviria, 59, told AFP he had shown up "to denounce the fact that our president has been kidnapped by the national police, that he has been detained with premeditation and treachery by Congress."
Ahead of the impeachment, the United States demanded Castillo "reverse his decision," and said after the vote that it no longer considered him to be the president.
"My understanding is that, given the action of the Congress, he is now former president Castillo," State Department spokesman Ned Price told reporters, saying lawmakers took "corrective action" in line with democratic rules.
Latin American governments voiced deep concern and appealed for respect for democracy, but there were also hints of support for Castillo from fellow leftist leaders.
Mexican President Andres Manuel Lopez Obrador, one of Castillo's staunchest allies, blamed "economic and political elites" for creating a hostile environment since the beginning of his "legitimate presidency."
The government of Gustavo Petro, Colombia's first left-wing president, called for dialogue involving "all political actors," adding that "democracy requires the recognition of the popular will expressed both in the elections for president and for Congress."
Brazil was more critical of Castillo, calling his attempt to dissolve Congress a "violation" of democracy and the rule of law.