Peru's outgoing president, Pedro Pablo Kuczynski, greets palace staff members after his resignation, at the Government Palace in Lima on March 22. (Mariana Bazo/Reuters)

A day after tendering his resignation, Pedro Pablo Kuczynski, the third Peruvian president to fall victim to Latin America’s rumbling corruption mega-scandal, appeared to be facing increasing legal jeopardy.

According to local reports, prosecutors have requested that Kuczynski be barred from leaving the country until they finalize their investigations into his dealings with the Brazilian construction company Odebrecht SA, which has admitted paying about $800 million in bribes to win public contracts in a dozen countries, mostly in Latin America.

The move marks yet another humiliation for the 79-year-old center-right economist, whose surprise election in July 2016 was widely hailed as an advance for Peruvian governance. Elected in part on his promises to tackle rampant corruption, the Oxford- and Princeton-educated former senior World Bank official was regarded as a distinguished technocrat unconnected from most of Peru’s unpopular political class.

But his downfall, over allegations of using his government contacts to lobby for Odebrecht in the past — including indirectly receiving six-figure payments for work reportedly carried out during a previous stint as economy minister — appears to have left Peru’s democracy in a more fragile state than ever. Kuczynski has said he is innocent, having placed a “Chinese wall” between his public work and his consulting firm, and said that the payments were for work done by business partners of which he was unaware. That explanation hasn’t convinced many Peruvians.

Kuczynski had been facing an impeachment vote Thursday on allegations of “permanent moral incapacity,” which he was expected to lose. But lawmakers instead debated Kuczynski's resignation. They appeared likely to accept his resignation letter on Friday, rather than having an impeachment trial.

Odebrecht is at the center of what has become Latin America’s biggest corruption scandal, with politicians across the region facing allegations of graft. Almost no major political figure in Peru has escaped the crisis. In recent weeks, Odebrecht executives have testified about undeclared campaign funding to various presidential candidates, including $1.2 million for the 2011 presidential run of Keiko Fujimori, the leader of the opposition Popular Force.

Some analysts are now comparing Peru’s plight with that of Brazil’s, where the Odebrecht scandal has tarnished virtually the entire political class and left the country with an unelected and unpopular chief executive after the 2016 impeachment of former president Dilma Rousseff.

Kuczynski’s successor, Vice President Martín Vizcarra, was due to be sworn in to the top job on Friday and faces the urgent task of forming a cabinet just three weeks before Lima hosts the Summit of the Americas, to be attended by President Trump and other Western Hemisphere leaders. The meeting’s theme, proposed by Kuczynski’s administration, is “democratic governance against corruption.”

A mild-mannered former regional governor who has been serving as Peru’s ambassador to Canada, Vizcarra was reported to have fallen out with the president y after the lobbying revelations.

Despite leaving office with an 81 percent disapproval rating, Kuczynski was just about as unpopular as the Congress that forced him out. Its disapproval rating is 82 percent, according to a new survey by polling firm GFK, an indication of how generalized corruption, and the Odebrecht scandal in particular, have ravaged Peruvians’ faith in their elected leaders. Nearly half the electorate wants an immediate general election, according to polls.

One previous president of Peru, Ollanta Humala, is in pretrial detention for allegedly receiving illegal campaign funding from Odebrecht, Latin America’s largest engineering firm, while another, Alejandro Toledo, a former visiting lecturer at Stanford University, is fighting extradition from the United States on charges that he took millions of dollars in bribes. They both deny wrongdoing.

In court in New York, Odebrecht and an affiliate agreed in 2016 to pay a $3.5 billion fine, thought to be a global record in a graft case, for paying bribes in various countries to get contracts. The United States claimed jurisdiction because some of the bribes flowed through its financial system.

Here in Peru, Kuczynski is hardly the only politician who has been seriously damaged in the last few days. Keiko Fujimori’s estranged younger brother, Kenji, is facing expulsion from Congress after being caught on video apparently offering kickbacks to legislators in return for voting against impeachment.

He and nine other lawmakers had split from Popular Force in December after breaking with the party during a previous impeachment vote. Three days after they saved Kuczynski’s political career, the president pardoned Alberto Fujimori, the 1990s strongman president serving a jail sentence for embezzlement and serious human rights violations. That move is said to have infuriated Keiko, who has opposed her father’s liberation, which threatened to harm her own presidential ambitions.

The video of Kenji Fujimori was taped clandestinely by a lawmaker loyal to his sister. For many Peruvians, the surreptitious recording brought back painful memories of the corruption and blackmail techniques used by the Fujimori regime two decades ago.