President Pedro Pablo Kuczynski survived an impeachment vote in congress late on Thursday, thwarting an attempt by opposition politicians to oust him over ties to the Brazilian construction giant implicated in the region's biggest corruption scandal.
Legislators cast their votes after 10 hours of debate over a day that began with the president presenting a forceful defence. He insisted he had no involvement in the payments made by Odebrecht to his private consulting firm more than a decade ago and warned that the rushed impeachment process was a threat to Peru's democracy and stability.
Applause erupted inside congress and his supporters cheered and waved Peruvian flags outside as it became clear the opposition would fall short of the two-thirds vote needed to remove Kuczynski.
"Tomorrow a new chapter in our history begins: the reconciliation and reconstruction of our country," Kuczynski later tweeted.
The impeachment effort against the 79-year-old former Wall Street banker was the latest chapter in the Odebrecht bribery scandal that has ended the careers of some of Latin America's most prominent politicians.
The company admitted in a 2016 US Justice Department agreement to paying nearly 800 million dollars (£600m) in kickbacks to politicians, their campaigns and political parties to secure lucrative public works contracts.
In Ecuador, Vice President Jorge Glas has been sentenced to six years in jail for orchestrating an Odebrecht bribery scheme. Former Brazilian President Luiz Inacio Lula da Silva is appealing his conviction on charges of corruption and money laundering related to the plot. In Peru, two former presidents stand accused of accepting money from Odebrecht. One is behind bars and the other in the US seeking to avoid extradition.
Kuczynski came under fire after an opposition-led investigative committee revealed documents last week showing Odebrecht made 782,000 dollars (£587,000) in payments to his private consulting firm more than a decade ago. Some of the payments overlapped with years that Kuczynski spent as a high-ranking government minister.
During his 30-minute testimony on Thursday, Kuczynski showed the contracts in question on an overhead screen, pointing out that none contained his signature. He said he had no knowledge of the payments and that he never favoured any company while in office. He characterised the transactions as part of a legal contract between two private companies and said his opponents were trying to force him from power without due process.
"I am here to look you in the eye, and tell you that I am not corrupt and I have not lied," he said, speaking slowly and assertively.
The vote capped a tumultuous eight days in Peru, which is one of South America's most politically volatile nations.
Analysts worried that impeachment could usher in a new period of uncertainty for Peru, an economic bright spot in Latin America that throughout its recent history has vacillated between short spans of democracy and autocratic rule.
"That they would impeach the president is not an unthinkable thing," said Steve Levitsky, a Harvard University political scientist who has spent years studying Peru. "It's that they would do it in a week without serious investigation, without a serious process of public debate."
The vote was pushed by the opposition Popular Force party led by Keiko Fujimori, who is the daughter of jailed former President Alberto Fujimori. She narrowly lost to Kuczynski in last year's presidential election.
Politicians debated for more than 10 hours, delivering impassioned speeches that touched on everything from the merits of neoliberal economic policy to a Gabriel Garcia Marquez short story reference.
The president's detractors contended that he should have disclosed the payments before taking office and that, at the very least, as a high-ranking government minister when the money was paid he should have done a better job to shield himself from potential conflicts of interest.
While Kuczynski managed to avoid impeachment his troubles are not yet over. He is due for questioning at the chief prosecutor's office next week, and a majority opposition rule in congress is likely to make it difficult for him to govern.