The death Wednesday of former President Alan Garcia after he shot himself in the head as police arrived at his home to arrest him for allegedly taking bribes from Brazilian construction giant Odebrecht has left Peruvian society in shock, especially the political party he still led.

The 69-year-old Garcia, who governed Peru from 1985 to 1990 and again from 2006 to 2011, died on the operating table at Lima's Casimiro Ulloa Hospital.

President Martin Vizcarra said on social networks that he is "consternated" and sent his condolences to Garcia's family and dear ones.

At the same time, Prime Minister Salvador Del Solar expressed his feelings "in this time of sorrow" to the former president's family, to those close to him and to militants of the Peruvian Aprista Party (PAP).

Also concerned was former President Ollanta Humala, a political adversary of Garcia who spent nine months in preventive detention in connection with the Odebrecht case.

"My family and I lament the passing of ex-President Alan Garcia Perez. We respect the sorrow of his dear ones," Humala said.

The leader of the main opposition party Fuerza Popular, Keiko Fujimori, currently being held in preventive custody for the Odebrecht case, said from her cell that she received "with much sadness, the news of the tragic departure of ex-President Alan Garcia."

From the door of the hospital where Garcia's death was certified, PAP spokesman Mauricio Mulder said his death was "an act of dignity and honor."

"The decision he has taken is a decision of dignity and honor, not allowing someone who was twice president to be humiliated and harassed by those who want to use him as a political trophy," Mulder said amid chants from PAP supporters.

The spokesman considered that Garcia decided to die rather than suffer the investigation that prosecutors were pursuing over the bribes Odebrecht paid to high officials of his second administration and whose evidence points directly at the former president.

Mulder described the investigation against Garcia as "a sick, fascist persecution in which sectors of the Attorney General's Office, the oligarchic press and political enemies have conspired."

PAP lawmaker Luciana Leon wrote that Garcia "has gone away to meet once more with our leader Victor Raul Haya de la Torre," the party's late founder.

Last November, Garcia took refuge at the Uruguayan Embassy in Lima and requested asylum hours after a court granted a request from prosecutors to bar him from leaving the country for 18 months as authorities investigated the bribery charges.

Uruguay ultimately rejected the application and Garcia ended up under house arrest.

It was not the first time Garcia sought to evade prosecution by relocating to another country.

He was granted asylum in Colombia in 1992 after then-President Alberto Fujimori dissolved Peru's opposition-controlled Congress in a "self-coup."

Garcia, who in the early 1990s faced allegations of graft stemming from his turbulent 1985-1990 presidency, when the country was racked by hyper-inflation, came home in 2001 after the expiration of the statute of limitations for those charges and went on to win another term as head of state.

Odebrecht reached a settlement in December 2016 with the United States Justice Department in which the firm pleaded guilty to paying hundreds of millions of dollars in bribes to government officials around the world.

As part of the settlement, Odebrecht has been cooperating with prosecutors in the affected countries to bring corrupt officials to justice.

Peruvian Judge Juan Carlos Sanchez Balbuena ruled last fall that documents handed over by Odebrecht provided "sufficient elements" to support the accusations against Garcia.

Odebrecht executive Carlos Nostre told Peruvian prosecutors that the company paid up to $24 million in bribes to secure the contract to build Lima Metro's Line 1 during Garcia's presidency.

Garcia, who has been living in Spain for a number of years, returned to Peru last year for questioning in the case.

Also ordered arrested on Wednesday were 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 last 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 in exchange for the Lima Metro contract.

Besides Garcia and Humala, two other former presidents, Alejandro Toledo and Pedro Pablo Kuczynski, have been caught up in the Odebrecht probe, along with two-time presidential candidate Keiko Fujimori, daughter of Alberto, who is serving a 25-year sentence for human rights abuses and corruption.