Humala, a former army officer who fought against the Maoist Shining Path rebels, first came to national prominence in 2000 when he led a short-lived military rebellion against then-President Alberto Fujimori.
In 2006, he ran for president. He allied himself with the Venezuelan president at the time, Hugo Chávez, and prosecutors alleged that Humala had accepted illegal funding from Chávez to finance his campaign.
His rival for the presidency, Alan García, used Humala's close ties to Chávez as a way to attack him, warning voters "not to let Peru turn into another Venezuela".
In 2011, Humala ran for the presidency again, this time on a more moderate platform.
He said that rather than emulating Chávez's socialist revolution in Venezuela, he would model his policies on those of the Brazilian president at the time, Luiz Inácio Lula da Silva.
His approach proved successful and he defeated his right-wing rival, Keiko Fujimori.
But violent social conflicts early on his presidency quickly dented his popularity.
He also lost the support of many members of Congress, further weakening his position.
His legal troubles started shortly after his term had finished in 2016.
That year, the Brazilian construction giant Odebrecht confessed to paying hundreds of millions of dollars in bribes to government officials and political parties across Latin America, to win business orders.
Prosecutors accused Humala and his wife of receiving millions of dollars from the Odebrecht.
A year later, a judge ordered that the couple be placed in pre-trial detention.
They were released after a year but the investigation into their links with Odebrecht continued, culminating in today's verdict.