A Peruvian judge on Thursday ordered the arrest of former President Ollanta Humala, 55, and his wife while they are under investigation on money-laundering and conspiracy accusations linked to a scandal involving giant Brazilian construction company Odebrecht.

Judge Richard Concepcion ruled in favor of preventive detention of Humala and his wife, Nadine Heredia, while prosecutors prepare formal charges against them.

The court order came after prosecutor German Juarez successfully argued the couple represented a flight risk to evade justice and that would interfere with his nearly three-year investigation.

The allegations against Humala followed the testimony by a former head of Odebrecht, who said he illegally contributed $3 million to Humala's 2011 presidential campaign.

Humala and Heredia are also accused of receiving money from the late Venezuelan leader Hugo Chavez during a previous, unsuccessful presidential bid.

Prosecutors have argued that Humala, whose term ended in 2016, never declared the contributions and that he and his wife conspired to hide them for personal gain.

Humala has denied the charges, calling them baseless.

In February, the same judge ordered the arrest of another former Peruvian president, Alejandro Toledo (2001-2006), on related charges.

Peru believes Toledo is living in the U.S. state of California and has asked U.S. President Donald Trump to consider deporting him to face charges of taking bribes in a far-reaching regional graft probe.

The bribes paid by Odebrecht include about $29 million paid in Peru for projects built during the administrations of Toledo and two of his successors, Humala and Alan Garcia.

Top officials across Latin America have been accused of taking an estimated $800 million in bribes from Odebrecht. The company acknowledged the bribes when it signed a plea agreement with the U.S. Justice Department in December 2016.

The same scandal involves former Brazilian President Luiz Inacio Lula da Silva, who was convicted Wednesday and sentenced to 9 years and six months in jail for taking gifts from another Brazilian builder.