LIMA (Reuters) - A Peruvian judge on Friday ordered former President Pedro Pablo Kuczynski to spend up to three years in jail while prosecutors prepare corruption charges against him for allegedly taking bribes from Brazilian construction company Odebrecht.

Slideshow ( 3 images )

The decision comes just two days after another former Peruvian president, Alan Garcia, committed suicide to avoid arrest in connection with Odebrecht, a Brazilian firm that has laid waste to Peru’s established political class as it has implicated officials and political leaders in alleged bribery schemes.

Kuczynski, an 80-year-old former Wall Street banker who once held U.S. citizenship, denies wrongdoing. Kuczynski did not attend the hearing before Judge Jorge Chavez on Friday because he was receiving treatment for heart problems in a local clinic.

After Garcia killed himself on Wednesday, Kuczynski’s attorney asked prosecutor Jose Domingo Perez to consider putting Kuczynski under house arrest instead of pre-trial detention as planned. But Perez said Kuczynski’s health problems could be treated without problem in jail, and Judge Chavez approved his request to hold Kuczynski in jail for 36 months before trial.

The ruling came as Garcia was being buried and will likely further fuel criticism that the Odebrecht probe has become too aggressive and that prosecutors and judges were abusing the use of so-called “preventive prison,” or pre-trial detention.

Under Peruvian law, criminal suspects can be held in jail before trial for up to three years if prosecutors show evidence that they would likely be convicted and would probably try to flee or obstruct the investigation unless detained.

Peru’s four most recent presidents and the leader of the opposition have been ordered to pre-trial detention in connection with Odebrecht since the company admitted in late 2016 that it paid some $30 million in bribes to Peruvian politicians, part of a sophisticated bribery system its former executives detailed to authorities abroad.

Prosecutors in the Odebrecht probe say they need preventive prison to keep wealthy and powerful suspects from evading justice as they gather evidence in the country’s biggest graft investigation. But critics, including the chief justice of Peru’s Constitutional Tribunal, Ernesto Blume, say it is being used excessively in response to anger at widespread corruption.

Kuczynski, who was president a little over a year ago, has said he has cooperated fully with investigators, even declining to file an appeal when they barred him from leaving the country shortly after resigning in March of 2018.

As president, Kuczynski initially denied having any link to Odebrecht. But he eventually acknowledged his consulting company advised Odebrecht on financing for projects that it had won while he was a cabinet minister in the government of former President Alejandro Toledo.

Toledo is fighting extradition from the United States after a judge ordered him jailed before a trial over allegations he took a $20 million bribe Odebrecht.

Another former president, Ollanta Humala, spent nine months in pre-trial detention in connection with Odebrecht before he was released on appeal.