LIMA, Peru — Peruvian lawmakers bitterly debated Thursday night over whether to accept President Pedro Pablo Kuczynski’s resignation offer, decrying him as one more in a long line of corrupt leaders who have deteriorated faith in the nation’s leaders.

The heated discussion ran late into the night, then the session recessed for an expected vote Friday. If legislators accept the resignation, they are scheduled to swear in Vice President Martin Vizcarra as Kuczynski’s replacement.

“The country is outraged,” legislator Marco Arana said as debate opened over whether to approve Kuczynski’s resignation or hold a vote to impeach him instead over allegations of wrongdoing related to Brazilian construction giant Odebrecht. “Our democracy has been hurt by five corrupt presidents. We don’t want one more.”

Most lawmakers appeared ready to accept the embattled president’s resignation and proceed swiftly with the constitutionally mandated transfer of power, though a handful pressed for a more forceful impeachment.

The legislators pushing for impeachment lambasted Kuczynski’s resignation letter in which he cast himself as a victim of a crude push to force him out as one more example of his failure to accept responsibility for any misconduct.

“This is a letter of impunity,” lawmaker Maria Elena Foronda said.

Kuczynski’s downfall caps four months of turmoil following revelations that his private consulting firm accepted $782,000 in payments more than a decade ago from Odebrecht, the Brazilian construction giant involved in Latin America’s biggest corruption scandal. He was a government minister during part of that time.

Kuczynski has denied any misdeed, saying he had no involvement in the Florida-based firm when the payments were made. But he agreed to step down Wednesday, saying he hoped the move would provide Peru more stability.

“Tomorrow I’ll be out of office,” he told supporters gathered outside his residence in an exclusive Lima neighborhood Wednesday evening while covering his shoulders with the Peruvian flag. “But I’ll continue working for Peru.”

Kuczynski’s resignation makes him the first sitting Latin American president to fall as a consequence of the Odebrecht scandal. The Brazilian company has admitted to paying millions in bribes in exchange for lucrative public works contracts in a scandal that has embroiled some of Latin America’s most prominent politicians.

Two former Peruvian presidents stand accused of accepting bribes from Odebrecht and a third is under investigation. Another former president, strongman Alberto Fujimori, was recently pardoned by Kuczynski from a 25-year jail sentence for human rights abuses committed during his decade-long rule. The pardon came days after Kuczynski narrowly dodged a previous impeachment attempt and sparked protests around the nation.

If congress approves Kuczynski’s resignation, things could quickly get grim for the former Wall Street investor. A Peruvian judge said Thursday he will consider a request to bar him from leaving the country if the resignation proceeds. At that point, Kuczynski would lose his presidential immunity and become vulnerable to prosecution.

Opinion polls say a majority of Peruvians are fed up not just with Kuczynski but all of congress. A number of legislators themselves are under investigation and Keiko Fujimori, leader of the Popular Force party that spearheaded the impeachment drive against Kuczynski, is also under scrutiny for having allegedly accepting money from Odebrecht.

At a gathering of several thousand protesters in Lima late Thursday, demonstrators chanted “Throw them all out!” and demanded new elections. Some held up signs featuring photocopies of recent headlines like “Leaders of crime.”

“I’m here to protest because we are tired,” said one woman. “We want them to speed up elections and get the corrupt politicians out.”

Cynthia McClintock, a specialist in Peruvian politics and professor at George Washington University, said the nation’s repeated corruption scandals have “tainted the image of democracy” and left people doubtful of their government.

She added that the continued Odebrecht fallout is likely to have repercussions in this year’s elections in Latin America. A half dozen countries around the region are slated to hold presidential votes.

“The hope is that political leaders will be getting this message: You can’t do this anymore,” she said.