A Peruvian judge has ordered ex-president Ollanta Humala and his wife Nadine Heredia held in pre-trial detention for allegedly accepting illegal campaign donations from Brazilian construction giant Odebrecht.
Humala and Heredia, who followed the televised 21-hour marathon hearing from home, surrendered to the judge on Thursday one hour after the ruling.
Judge Richard Concepcion Carhuancho ordered 18 months of pre-trial detention for the couple for the crime of money laundering against the interest of the state.
Humala, president 2011-2016, said the ruling is a confirmation of abuse of power, vowing on Twitter to face it head-on in defence of our rights.
Defense attorneys said the couple would immediatly file an appeal.
Grupo Odebrecht, Latin America's largest construction conglomerate, came under scrutiny during the probe of a massive pay-to-play scheme at Brazil's state oil company Petrobras that has tarnished the names of Brazil's top politicians and business executives.
The fallout spread across Latin America when Odebrecht executives admitted in plea bargains that a secret company bribery department systematically paid multi-million-dollar bribes to win public works contracts in 12 countries in the region.
The Brazilian construction giant admitted to paying $29 million in bribes in Peru to win government building contracts between 2005 and 2014 a time period that also includes the presidencies of Alejandro Toledo and Alan Garcia.
Toledo president from 2001-2006 is currently in the United States in defiance of an 18-month pre-trial detention order for allegedly receiving $20 million in Odebrecht bribes.
One of the main prosecution claims is that Humala and Heredia accepted $3 million from Odebrecht for the 2011 presidential campaign.
Humala denies the charge, though he says that Peruvian law does not forbid foreign campaign contributions.
The prosecution also claims that Humala accepted contributions from Venezuela during his failed 2006 presidential bid.