Two former presidents in Peru are facing disparate outcomes in the corruption cases they face.

A Peruvian appeals court on Wednesday ordered the release of former president Martin Vizcarra, who was in pretrial detention on allegations of corruption and deemed a flight risk last month.

Vizcarra, who led Peru from 2018 until 2020, is accused of taking 2.3 million soles (approximately $640,000 USD) in bribes, in exchange for public works contracts, 11 years ago while he was the governor of the Moquegua region in southern Peru.

He maintains his innocence.

The 62-year old was being held in a prison for former presidents, where Alejandro Toledo, Ollanta Humala and Pedro Castillo are also imprisoned.

Toledo, who is already serving 20 years and six months, was sentenced Wednesday to 13 years in prison for a money laundering case tied to bribes he took from Brazilian construction giant Odebrecht.

The new sentence will not be added to the previous sentence because under Peruvian law the harshest sentence holds as the maximum penalty.

The 79-year-old governed Peru from 2001 to 2006, and attended the hearing virtually.

"I am deeply disappointed in the (judicial) system)" he told the court upon hearing the ruling, which he vowed to appeal.

Prosecutors estimate Toledo received an estimated $35 million in bribes from Odebrecht, and used them to buy real estate.