Former President Alan Garcia died Wednesday at a Lima hospital while undergoing surgery after shooting himself as Peruvian police arrived at his home to arrest him in connection with the Odebrecht corruption case.

Garcia's personal secretary, Ricardo Pinedo, told reporters gathered outside the hospital that the former president had died.

President Martin Vizcarra and spokesmen for Garcia's Aprista Party also confirmed the former leader's death.

"Upset about the death of former President Alan Garcia. I send my condolences to his family and loved ones," Vizcarra said in a Twitter post.

Police had gone to the former head of state's residence to serve an arrest warrant issued by judicial authorities investigating alleged corruption linked to the Brazilian construction giant.

The 69-year-old Garcia, who governed Peru from 1985 to 1990 and again from 2006 to 2011, was transported by police to Lima's Casimiro Ulloa Hospital.

Eyewitnesses told Peruvian television that one of Garcia's sons arrived at the hospital soon after.

Hospital spokesmen told EFE that the former president was admitted to the hospital with a gunshot wound on the right side of his head.

The hospital's director, Enrique Gutierrez, said the former president had suffered a gunshot wound with "entry and exit" holes, adding that a team of doctors worked to try to save his life.

The incident occurred when agents from the unit investigating corruption showed up at the politician's residence, where he had been under house arrest since the end of last year.

Garcia had been ordered to not leave the country and the agents were going to detain him under a 10-day provisional arrest warrant issued by a judge.

A judge also ordered the arrests of Luis Nava, presidential secretary under Garcia, and Miguel Atala, another close associate and suspected front man of the former president.

Garcia's legal situation worsened on Sunday, when news broke that Odebrecht had agreed to share information with Peruvian authorities, revealing that Nava and his son, Jose Antonio Nava, received $4 million to grant a construction contract for the Lima Metro's Line 1.