Security officials escort Bolivia's former President, Jeanine Anez to Miraflores prison after she attends her trial on the 2019 political crisis, in La Paz, Bolivia October 17, 2024. REUTERS/Claudia Morales/File Photo

LA PAZ (Reuters) -Bolivia's Supreme Court ordered the immediate release of former president Jeanine Anez on Wednesday, ending several years of detention linked to legal proceedings stemming from her interim administration in 2019, Justice Romer Saucedo said.

"The annulment of the sentence has been ordered. She had a final sentence of 10 years, and consequently, her release is ordered today," Supreme Court Justice Saucedo told reporters.

Anez was arrested in March 2021 and spent 20 months in pre-trial detention before being convicted in 2022 of violating constitutional norms that safeguard democratic order.

Her administration oversaw deadly crackdowns on protests, during which 22 civilians were killed. Anez has denied all charges against her.

The ruling comes weeks after Bolivia's October runoff election delivered a historic defeat to the ruling Movement to Socialism (MAS) party which had accused Anez of orchestrating a coup that brought her to power during a 2019 political crisis, shifting congressional control to the center-right opposition.

The Supreme Court annulled ordinary criminal proceedings against Anez and redirected her case to a "trial of responsibilities," a special process reserved for former heads of state. The judiciary has ordered her release so she can defend herself under that process.

(Reporting by Daniel Ramos in La Paz, Writing by Lucinda Elliott, Editing by Natalia Siniawski)