The former Peruvian president was facing arrest wanted over corruption allegations.
Peru's former president Alan Garcia has died in hospital after shooting himself at his home as police were about to arrest him in a sprawling corruption case.
He was 69.
"Alan Garcia has died, long live Apra," said Omar Quesada, the general secretary of Garcia's American Popular Revolutionary Alliance (Apra) party.
Peru's current President Martin Vizcarra expressed his sympathy on his Twitter account.
"Dismayed by the death of ex-president Alan Garcia. I send my condolences to his family and loved ones," Vizcarra wrote in a tweet.
Mr Garcia was president on two occasions, from 1985-90 and 2006-11.
Police were acting on an arrest warrant for money laundering linked to the wide-ranging corruption scandal involving Brazilian construction giant Odebrecht.
Mr Garcia suffered cardiac arrest three times while undergoing emergency surgery, Health Minister Zulema Tomas said.
He was resuscitated three times after suffering cardiac arrest while undergoing emergency surgery, before finally succumbing, Peru's Health Minister Zulema Tomas had said.
The Casimiro Ulloa Emergency Hospital in Lima earlier confirmed he had suffered "a bullet wound to his head."
"This morning there was a regrettable accident: the president took the decision to shoot himself," Erasmo Reyna, Garcia's lawyer, told reporters outside the hospital after Garcia was admitted.
The attempted arrest took place at 6:30 am (1130 GMT) at Garcia's home in Lima's upmarket Miraflores neighborhood.
Police were acting on an arrest warrant for money laundering that would have allowed Garcia to be held for 10 days, giving authorities time to gather evidence and prevent him from fleeing, the prosecutor's office said.
Asylum application denied
Mr Garcia was suspected of having taken bribes from Brazilian construction giant Odebrecht in return for large-scale public works contracts.
In November, he sought refuge in the Uruguayan Embassy after a court ordered him not to leave the country for 18 months.
He applied for asylum but following 16 days in the embassy he left when his request was denied.
Mr Garcia, a social democrat, claimed to be the target of political persecution, an accusation denied by centrist Vizcarra.
On Tuesday, Mr Garcia said he would neither try to flee nor hide again.
In recent weeks, Mr Garcia insisted that "there is no statement, evidence or deposit that links me to any crime and even less so with the Odebrecht company or the execution of any of its projects."
Although under investigation by the public prosecutor's office, Mr Garcia had not been charged with anything.
Money laundering and bribes
He was one of four Peruvian ex-presidents embroiled in various corruption scandals - alongside Pedro Pablo Kuczynski (2016-18), Ollanta Humala (2011-16) and Alejandro Toledo (2001-06).
Mr Kuczynski, who is accused of money laundering and was being held under a 10-day preliminary detention until April 20, was also taken to hospital on Wednesday suffering from high blood pressure.
The 80-year-old was being treated in intensive care and had a cardiac catheter fitted, lawmaker Gilbert Violeta said.
Mr Toledo faces extradition from the United States, having been charged with taking a $20 million Odebrecht bribe.
Odebrecht has admitted paying $29 million in bribes to Peruvian officials over three administrations.
Some of those payments were allegedly made during Mr Garcia's second term in office to secure a contract to build the Lima metro.
Peruvian press reports also claim Garcia received a $100,000 payment from an illicit Odebrecht fund for giving a speech to Brazilian business leaders in Sao Paulo in May 2012.
Prosecutors allege that Garcia and 21 other officials conspired to enable Dutch company ATM Terminals to win a 2011 concession to operate a terminal at the port of Callao, near Lima.
Another ex-president, Alberto Fujimori (1990-2000), is serving a 25-year sentence for crimes against humanity and corruption.
His daughter, opposition leader Keiko Fujimori, is being held in pre-trial detention for up to three years, accused of accepting $1.2 million in illicit party funding from Odebrecht for her 2011 presidential campaign.
Readers seeking support and information about suicide prevention can contact Lifeline on 13 11 14