LIMA, Peru (AP) — Alan García, a former Peruvian president whose first term in the 1980s was marred by financial chaos and rebel violence, and who was recently targeted in Latin America's biggest corruption scandal, shot himself and died on Wednesday at the age of 69.

President Martin Vizcarra announced on Twitter that García died after undergoing emergency surgery for a bullet wound hours earlier.

García killed himself before being detained by police amid allegations he received illegal payments from Brazilian construction giant Odebrecht after Peruvians voted him back into the presidency for a second term in 2006.

A lifelong politician, García's career was marked by epic triumphs and devastating setbacks in a rollercoaster of a public life fueled by his charisma and capacity for reinvention.

He was "condemned to become president again and again," a former president, Fernando Belaunde, once said.

García became an increasingly isolated figure whose claims that the Odebrecht corruption probe was politically motivated failed to resonate among a public accustomed to intrigue and machinations at the highest levels of government.

The scandal also ensnared three other former heads of state and a long string of powerful officials as Peru went further than any other country outside Brazil in prosecuting politicians tied to the Odebrecht probe

But García's bid for a reconstructed political legacy long after the darkest days of the Maoist Shining Path insurgency that marked his first term in office fell short as investigators closed in on him.

He maintained his innocence until his death, arguing that he was the victim of false testimony alleging that he took bribes from Odebrecht during the construction of Lima's metro during his 2006-2011 government.

He was never charged.

Copyright 2019 The Associated Press. All rights reserved. This material may not be published, broadcast, rewritten or redistributed.