Peru's President Pedro Pablo Kuczynski has quit over a vote-buying scandal.
He has denied wrongdoing but said on Wednesday that he did not want to be an obstacle to the country's development.
Party leaders in Congress later agreed to accept President Kuczynski's resignation. He had been facing an impeachment vote on Thursday, according to a BBC report.
Pressure has been growing after footage emerged of his allies offering opposition politicians financial rewards if they backed him in the vote.
Mr Kuczynski, 79, survived a separate impeachment vote in December.
His opponents wanted to remove him for allegedly receiving illegal payments from the Brazilian construction giant Odebrecht.
But he held onto power by a slim margin and accused the opposition of trying to stage a coup.
In an address to the nation, Mr Kuczynski said the video footage had been edited to incriminate him.
"The opposition has tried to paint me as a corrupt person and they have managed to influence a group of reasonable and honest workers around me, getting them unfairly involved in this plot to destroy the government," he said.
"I categorically reject these unsubstantiated claims and reaffirm my commitment to an honest, moral and fair Peru for everyone."