Former Peruvian President, Alan Garcia died Wednesday after shooting himself in the head moments after the police attempted to detain him over corruption allegations in Latin America’s largest graft probe.

Reports say while officers waited outside his residence to arrest him, Garcia locked himself in a room and shot himself. He was rushed to a nearby hospital in Lima but died during surgery.

President Martin Vizcarra announced on Twitter that Garcia died after undergoing emergency surgery. Doctors at the Jose Casimiro Ulloa Hospital in Lima said they provided cardiac resuscitation three times all in a bid to save his life.

The 66-year-old Garcia was accused of receiving bribes from Brazilian construction conglomerate, Odebrecht but he has severally denied any wrongdoing and claimed he was being persecuted.

Odebrecht has however admitted that Peru was one of the several countries where government officials were bribed so that the company could obtain lucrative contracts.

In 2016, several Odebrecht executives admitted to United States officials in plea-bargaining agreements that the company distributed more than US$29 million in bribes in Peru between 2005 and 2014 for benefits in infrastructure works.

García and former Peruvian President, Ollanta Humala had on February 2017 testified about irregularities in infrastructure works during their terms in office, including their dealings with Odebrecht. 

The shocking end for the man who twice ruled Peru comes amid national upheaval over endemic corruption involving nearly every former living president of the country.

The stunning turn of events also comes four months after Garcia tried to seek asylum in Uruguay as prosecutors in Peru investigated allegations that he illegally took payments from Odebrecht.