A much-weakened Pedro Pablo Kuczynski embarked on a cabinet reshuffle Friday, a day after the Peruvian president narrowly staved off impeachment over allegations of corruption linked to disgraced Brazilian construction firm Odebrecht.
But the failure to topple the 79-year-old president has also opened a serious rift within the opposition, which had been convinced it had the votes to force him out.
Analysts said Kuczynski, who had been staring down charges of corruption and lying, would have to introduce "severe changes" in the way he runs his government, which was elected 18 months ago.
One of those immediate changes was accepting the resignation tendered last week by his interior minister Carlos Basombrio, who has yet to publicly disclose why he is stepping down.
After a week of political uncertainty that has roiled markets in Peru, Kuczynski -- an economist by training -- survived a 14-hour session in Congress that failed by eight votes to institute impeachment proceedings.
Kuczynski had been accused of taking $5 million in bribes from Odebrecht and then lying to cover his tracks.
"The president has certainly been saved, but his image has been tarnished," said political analyst Fernando Tuesta Soldevilla.
After his close shave, Kuczynski announced the country would embark on a "new chapter... of reconciliation and reconstruction." He had earlier called the accusations against him a "coup" and an "attack" on democracy.
"Peruvians, the trust you have placed in me will not be betrayed," Kuczynski said in a message broadcast Friday night on television.
"I have learned about myself and my mistakes, which I will not repeat," he said.
The impeachment charges were being pushed by an opposition led by Keiko Fujimori, daughter of ex-president Alberto Fujimori, who is in jail on corruption and human rights charges.
She lost to Kuczynski in last year's presidential election and is herself facing questioning linked to the sprawling Odebrecht graft investigation.
Many Peruvians expressed relief Friday that their president had dodged the bullet.
"If he had been impeached, Fujimoriism would have been more powerful and that would have fed into internal strife and instability," said 35-year-old Nicolas Sandoval.
- The president's Santa -
"We have to stick with the president we elected, not resort to letting members of Congress topple him," said Jenny Dioses, a 29-year-old businesswoman.
Former president Ollanta Humala, who served between 2011 and 2016 and is himself currently in detention linked to the Odebrecht scandal, congratulated Kuczynski.
"Political stability for the country came out ahead here," he said on Twitter from the jail where he is awaiting trial on money laundering charges.
Had he been impeached, Kuczynski -- who is also an accomplished musician and cousin of French film-maker Jean Luc Godard -- would have been the highest scalp claimed in the Odebrecht scandal. He insist the $5 million from the Brazilian firm was simply a legitimate consulting fee.
The money was received between 2004 and 2013, a period during part of which Kuczynski was economy minister and head of cabinet for then-president Alejandro Toledo.
Odebrecht has admitted to paying millions of dollars in bribes to top officials in several Latin American countries to secure lucrative and inflated public works contracts.
It has said it paid $20 million in kickbacks to Toledo, whom Peru wants extradited from the United States to face charges.
The close shave may have left Kuczynski on the ropes, but it also sparked infighting in the opposition.
Opposition lawmakers and members of Keiko Fujimori's Popular Force -- which holds 70 of Congress' 130 seats -- were angry in particular with Fujimori's own brother Kenji, who broke with the party line and abstained.
Yeni Vilcatoma, an independent opposition deputy, said Kenji had "betrayed not only his party but his country too."
Kenji Fujimori, whose more moderate line has set him at odds with his sister recently, was followed by other deputies from the party whose votes were crucial to securing the impeachment.
"Kenji is a sort of Santa Claus who appeared with his Christmas sleigh bringing 10 congressional votes," said political analyst Luis Benavente.
"They have a parliamentary majority but it is fractured and facing an uncertain future," he said, noting that Kenji "was the principal cause of his sister's defeat."
Keiko tweeted on Friday that she was proud of "members of Congress who remained firm in the fight against corruption."
Congressman Hector Becerril on Friday called on Kenji and the other nine dissenters to quit the party. "They cannot be on our benches and not believe in our principles," he said.
Benavente said a possible pardon for Alberto Fujimori, who was president from 1990-2009 and is currently serving a 25-year jail term, could be a way for Kuczynski to pay off his political debt to the ex-president's son.
"Kenji has raised the issue of a pardon for his father in an intense and determined manner," he said.