Peru's President Pedro Pablo Kuczynski announced his resignation Wednesday in an address to the nation, the day before he was to face an impeachment vote in Congress.
The 79-year-old former Wall Street banker, under fire over his links to Brazilian construction giant Odebrecht, denied allegations of bribe-taking but said his resignation was "the best thing for the country."
Kuczynski is the first president to lose his job over the scandal in which the Brazilian company admitted paying out millions of dollars in bribes and gifts to Latin American politicians and businessmen to secure public works contracts.
His resignation comes a few weeks before Kuczynski was due to host the Summit of the Americas in Lima, where US President Donald Trump and others leaders of the Western Hemisphere are expected April 13-14.
"Faced with this difficult situation that unfairly makes me appear guilty, I think the best thing for the country is for me to resign the presidency of the republic," he said in the televised address, which showed him seated at a polished conference table with his cabinet standing grim-faced behind him.
"I do not want to be an obstacle, for the country to continue suffering with the uncertainty of these recent times," said the president, who survived a previous impeachment vote in December.
The Congress said it would debate the resignation on Thursday and vote on Friday on whether to accept it.
Vice President Martin Vizcarra, who is currently serving as Peru's ambassador to Canada, is likely to replace Kuczynski to avoid early elections at a time of widespread voter discontent with political parties.
Vizcarra, who is expected in Lima on Thursday, would hold the post until July 2021, when Kuczynski's mandate was due to end.
Pressure built on Kuczynski to resign throughout Wednesday after the opposition alleged the embattled president was trying to buy votes ahead of the impeachment ballot.
Lawmakers from Keiko Fujimori's Popular Force party released recordings of her brother Kenji and others apparently negotiating public works contracts in return for votes, and said it was proof that Kuczynski was trying to buy votes.
"This government thought it could buy everything. There will always be brave and worthy Peruvians who are not for sale. It's time to tell Mr PPK that he's leaving, and NOW!" Keiko Fujimori tweeted, using the president's initials.
The videos, dating from December, were filmed ahead of the previous impeachment vote, which Kuczynski survived with Kenji Fujimori's help.
Days later, Kuczynski pardoned the Fujimoris' imprisoned father, ex-president Alberto Fujimori, in what was widely seen as a payoff for support.
The government denied vote-buying.
- Odebrecht's Reach -
The bitter feud between the Fujimori siblings -- on opposite sides for the first impeachment vote -- is likely to continue to be a feature of Peruvian politics.
Vizcarra will have the same challenges as Kuczynski, posed by an opposition-dominated Congress bent on undermining the government.
One compromising video purported to show Kenji trying to convince another Fujimori lawmaker to vote against impeachment in December, in exchange for political favors.
"With deep disappointment and pain, Peru is once again witnessing negotiations for the purchase of Congressmen, and I regret even more that my own brother is involved in these practices that hurt us so much as Peruvians and as a family," Keiko wrote on Twitter.
Her brother snapped back with a Tweet that attacked "the baseness and criminal attitudes of Popular Force and my sister Keiko" accusing them of "distorting information."
Kuczynski said during the week he was confident of defeating the impeachment vote.
On Sunday, Kuczynski said removing him would amount to a "coup d'etat" in the South American country -- and tarnish Peru's image just before it is due to host the Summit of the Americas.
Odebrecht has admitted spending millions to bribe government officials across Latin America to secure public works contracts.
Other politicians to lose their posts include Ecuador's former vice president Jorge Glas. He was jailed for six years.
The Supreme Court last week cleared the way for Peru to formally request the extradition of former president Alejandro Toledo from the US.
Toledo, 71, is to face charges of accepting a staggering $20 million in bribes from Odebrecht.
Odebrecht said it paid five million dollars in fees to companies linked to Kuczynski when he was Peru's economy minister, under Toledo.
He was accused of lying about his ties to Odebrecht, but later admitted he had taken the money for what he and the company insist were legitimate consulting fees.
The scandal, which has dogged the president over the past six months, finally became too much for the elderly politician when it became increasingly clear he could not survive the impeachment vote.
"This political confrontation has created a climate of ungovernability which has done huge damage to the country and does not allow us to make progress," he said with regret in his voice during his address.
He leaves behind an economy that has performed well below expectations.
"We are seeing a complicated picture because the economy is feeling the impact of the political instability linked to the president," economist Jorge Gonzalez Izquierdo told AFP.