The Peruvian attorney general's office said on Tuesday it was seeking pretrial detention for former President Ollanta Humala, who is under investigation for money laundering over allegations he took illegal funds from Brazilian builder Odebrecht SA.

A hearing to rule on the request for the pretrial detention for Humala and his wife, Nadine Heredia, was scheduled for Wednesday, the attorney general's office said on Twitter without providing additional details.

The attorney general's office asked Judge Richard Concepcion to detain Humala and Heredia for up to 18 months, the office of Peru's judiciary said in a statement. Humala and Heredia must attend the hearing on Wednesday in his courtroom, it added.

Humala and Heredia have been suspects in a money laundering investigation by German Juarez, a public prosecutor who has accused the couple of taking illegal funds from Odebrecht to help finance Humala's campaign.

Juarez traveled to Brazil this year to question Marcelo Odebrecht, the company's imprisoned former chief executive who has turned state's witness.

Humala, who governed Peru from 2011 to 2016, and Heredia have repeatedly denied any wrongdoing and have vowed to cooperate fully with the investigation.

Humala's lawyer, Wilfredo Pedraza, said nothing had happened recently to justify the so-called preventive prison, or pretrial detention, request that is often used in Peru to keep suspects from fleeing or obstructing open investigations.

If the request for detaining Humala is approved by a judge, it would make the ex-president the second former Peruvian leader whose arrest has been sought since Odebrecht acknowledged in a settlement with U.S. and Brazilian prosecutors late last year that it paid bribes across Latin America.

Earlier this year, a judge ordered former President Alejandro Toledo, whom prosecutors have accused of taking bribes from Odebrecht, to be detained for up to 18 months while formal charges are prepared.

Judges in Peru often order suspects to spend several months to years in prison before a trial.

The practice has been criticized by some as unfair.

Toledo, who has denied wrongdoing, has refused to turn himself in and has alleged that Peru's justice system denied him due process for trying to imprison him before trial.

Odebrecht has said it paid $29 million in bribes in Peru between about 2005 and 2014 and has vowed to provide details on its kickback schemes to authorities.