LIMA, Peru -- A Peruvian judge on Saturday barred recently resigned President Pedro Pablo Kuczynski from leaving the South American nation for 18 months while he's investigated for money laundering. The ruling came a day after congress accepted Kuczynski's resignation and swore in Vice President Martin Vizcarra as his successor.

Kuczynski, 79, is being probed for some $782,000 in payments his consulting firm received a decade ago from Odebrecht, the Brazilian construction giant at the heart of Latin America's biggest-ever bribery scandal. Some of the payments took place when Kuczynski was a government minister, raising questions about whether they were made in return for political favors.

The former Wall Street investor has denied any wrongdoing. He said the consulting firm, Westfield Capital, was then being managed by his business partner and that he paid taxes on all earnings from that era.

Get Breaking News Delivered to Your Inbox

Odebrecht has admitted to paying $800 million in bribes to officials across Latin America including $29 million in Peru.

At the same time the hearing was taking place, prosecutors carried out a search of Kuczynski's home in Lima and another property outside the capital.

"Peru since the 19th century has watched the sad show as presidents and ex-presidents flee the country and justice," said Hamilton Castro, the anti-corruption prosecutor who had requested Kuczynski be barred from leaving Peru. "This is the historical behavior that we seekers of justice have to take into account."

Kuczynski's lawyer promised his client's full cooperation and said he would abide by the prosecutor's request not to leave the country. Kuczynski was not present at Saturday's hearing.

Kuzynski is the fourth former Peruvian president to be investigated for taking payments from Odebrecht. One is currently in jail while another, Alejandro Toledo, for whom Kuczynski served as finance minister, has refused to return to Peru from the U.S. to face charges.