A low-profile former regional governor has been sworn in as Peru’s president after his predecessor became the latest of the country’s leaders to resign amid corruption scandals and public repudiation.

Martín Vizcarra promised to fight corruption “head on” before he was sworn in on Friday, hours after congress voted overwhelmingly to accept the resignation of Pedro Pablo Kuczynski.

Kuczynski, known as PPK, abruptly tendered his resignation on Wednesday after it became clear he would not survive a second attempt to impeach him over a new corruption scandal.

The 79-year-old said he had been the victim of malicious campaign by the dominant political opposition and denied any wrongdoing.

Less than two years into a five-year term, Kuczynski is the first sitting president in Latin America to be forced out over ties to the Brazilian construction giant Odebrecht, which has been at the centre of the continent’s biggest corruption scandal.

It has tainted nearly all of Peru’s main political players of the last two decades.

Kuczysnki is accused of repeatedly lying about decade-old business ties to the Brazilian firm. He narrowly escaped impeachment for “permanent moral unfitness” in December after apparently striking a backroom deal with Kenji Fujimori, a dissident from the majority opposition party led by his sister Keiko.

Three days later, Kuczynski pardoned the Fujimoris’ father Alberto, the former president who was jailed in 2009 for authorising death squads, overseeing rampant corruption and vote-rigging.

But the move failed to appease Keiko Fujimori, whose party released the secretly filmed videos this week which showed Kuczynski’s allies attempting to buy votes from opposition lawmakers to save him from impeachment.

“It was a gigantic error,” Martin Tanaka, a political scientist at the Institute of Peruvian Studies, told the Guardian. “It did nothing to improve his relationship with the Fujimoristas and earned him the hatred and emnity of the anti-Fujimoristas who had supported him throughout the previous attempt to oust him.”

Among those former allies, the leader of the leftist Nuevo Peru party Veronika Mendoza, who called for PPK to be ousted and new elections to renew Peru’s corruption-ridden system.

“Our traditional political class has plundered our state,” she told supporters on Wednesday. “PPK is not a victim, he’s going because he’s corrupt and immoral.”

It was an embarrassing end to a presidency which began with high hopes that the Oxford and Princeton-educated technocrat could modernise Peru and fight graft.

But for many Peruvians, some of whom protested in downtown Lima on Thursday night, PPK represented the corrupt political class. Amid clashes with police, protesters chanted to “get rid of them all”.

Vizcarra, the incoming president, faces many challenges – not least his own low profile: an opinion poll earlier this month showed 81% of Peruvians didn’t recognise his name.