Peru’s former President Ollanta Humala and his wife Nadine Heredia spent their first night in prison after a court ruled Thursday they should be jailed pending an investigation into money laundering during two election campaigns.

The couple turned themselves in at a court house in downtown Lima and were transferred to a holding cell after Judge Richard Concepcion ordered 18 months of preventive detention. Concepcion said there were sufficient grounds to believe Humala and his wife would seek to obstruct an ongoing investigation by the Attorney General’s office.

Prosecutor German Juarez alleges the couple, who founded Peru’s Nationalist Party in 2005, enriched themselves with cash donated to Humala’s 2006 and 2011 presidential elections. The judge said new evidence presented by the prosecutor suggested there was a “high level of probability” that Humala and Heredia laundered funds that had illicit origins in Brazil and Venezuela.

Juarez told the judge that the couple posed a flight risk and should be jailed while his investigation continues. Humala and Heredia deny any wrongdoing and their lawyers said they will appeal the decision.

“This is confirmation of the abuse of power, which we’ll confront, in defense of our rights and the rights of all,” Humala said on his verified Twitter account after the verdict.

Television images showed police officers arriving to stand guard outside of the family home in an upscale neighborhood in Lima’s Surco district as the judge summed up. Minutes after he issued his final verdict, the couple left the house by car, headed to the court to turn themselves in, Canal N reported.

According to Juarez, the Venezuelan government financed Humala’s 2006 campaign, while Brazilian construction companies Odebrecht SA and Construtora OAS financed the 2011 campaign.

Humala is Peru’s second former leader to face the threat of jail as part of the investigation into a vast bribery scheme mounted by Brazilian construction companies to win contracts at home and abroad. In February, Concepcion ordered the arrest of former President Alejandro Toledo on allegations he received $20 million from Odebrecht in exchange for a highway contract. Toledo, who denies any wrongdoing, lives in the U.S. and the Peruvian government is seeking his extradition.

Juarez began a money laundering probe into Heredia in 2015 and started investigating Humala in October 2016, less than three months after his presidency ended.