LIMA: Peru's Vice President Martin Vizcarra, an austere engineer with no connection to traditional political parties, was set to be sworn in Friday as the country's president, replacing Pedro Pablo Kuczynski, who resigned this week amid a swirling corruption scandal.
Vizcarra, who had been serving as Peru's ambassador to Canada, arrived during the night to assume the presidency but there had been uncertainty up to the last minute whether the Congress would accept Kuczynski's resignation.
Some lawmakers had been pushing for a vote to impeach the 79-year-old president over his links to Brazil's scandal-plagued construction giant Odebrecht.
But shortly before Vizcarra's swearing-in at 1700 GMT, the Congress voted 105-11, with four abstentions, to accept Kuczynski's resignation, which he had offered Wednesday when it became clear he could not survive an impeachment vote.
"The resignation has been accepted," said Luis Galarreta, the leader of Congress, after the vote.
Odebrecht revealed in December that it had paid nearly $5 million to consulting companies linked to him when he was finance minister.
The Brazilian company also has admitted that it made campaign contributions between 2006-2011 to the last four Peruvian presidents.
Impeach or resign?
Earlier Friday, Kuczynski threatened to withdraw his resignation, saying on Twitter he would rather be impeached and have a trial at which he would have a chance to defend himself.
The situation echoes what happened to Alberto Fujimori in 2000 at the end of his decade-long run as Peru's president.
Congress impeached Fujimori on the grounds of "permanent moral incapacity," bringing to an end weeks of political drama.
Fujimori had resigned by fax -- sent from his hotel room in Japan -- but this was rejected by Congress, which chose instead to punish the ex-strongman.
By resigning on the eve of an impeachment vote, Kuczynski was hoping to avoid the same fate.
Vizcarra will fill the gap -- and thus head off the need for early elections at a time of widespread voter discontent.
He should hold the post until July 2021, when Kuczynski's mandate was due to end.
Outgoing economy minister Claudia Cooper, who resigned in solidarity with Kuczynski, said Vizcarra would inherit an economy with the strongest growth in the region.
Analysts predict Peru's economy will grow by more than two percent this year.
Ratings agency Standard and Poor's said Peru's ratings were not immediately affected by the resignation.
But it said Vizcarra "will need to forge alliances in the Congress to avoid recurrent conflicts and move ahead with the government's existing spending agenda."