Peru's former President Alan García has shot himself as police came to arrest him.
Casimiro Ulloa hospital in the capital, Lima, said he was in surgery where he was being treated for "a bullet wound to his head".
Mr García is accused of taking bribes from Brazilian construction company Odebrecht - claims he has repeatedly denied.
Officers had been sent to arrest him in connection with the allegations.
Interior Minister Carlos Morán told reporters that when police arrived, Mr Garcia asked to make a phone call and went into a room and closed the door.
Minutes later, a shot rang out, Mr Morán said. Police forced the door open and found Mr Garcia sitting on a chair with a bullet wound to his head.
Health minister Zulema Tomás said Mr García's condition was "very serious and critical", and that he had to be resuscitated after suffering three cardiac arrests.
"Let's pray to God to give him strength," the former president's lawyer Erasmo Reyna reportedly told journalists at the hospital.
Mr García served as president from 1985 to 1990 and again from 2006 to 2011.
Investigators say he took bribes from Odebrecht during his second term in office, linked to a metro line building project in the capital.
Odebrecht has admitted paying almost $30m (£23m) in bribes in Peru since 2004.
But Mr García says he is the victim of political persecution, writing in a tweet on Tuesday that there is "no clue or evidence" against him.
What is the Odebrecht scandal?
Odebrecht is a Brazilian construction giant behind major infrastructure projects around the world, including venues for the 2016 Olympics and 2014 World Cup in its home country.
But under the glare of anti-corruption investigators the company admitted paying bribes in more than half of the countries in Latin America, as well as in Angola and Mozambique in Africa.
Investigators say Odebrecht bribed officials or electoral candidates in exchange for lucrative building contracts.
The corruption scandal has brought down politicians throughout Latin America.
How is Peru affected?
Peru's four most recent presidents are all being investigated for alleged corruption, with a fifth - Alberto Fujimori - serving a prison sentence for corruption and human rights abuses.
Ex-leader Pedro Pablo Kuczynski was taken to hospital with high blood pressure on Wednesday just days after his own arrest in connection with Odebrecht charges.
And the current leader of the opposition, Keiko Fujimori, is also in pre-trial detention on charges of taking $1.2m (£940,000) in bribes from Odebrecht.
In October, an opinion poll by Datum showed 94% of Peruvians believed the level of corruption was either high or very high in their country.
The scandal embroiling Peru's presidents
- Pedro Pablo Kuczynski, in office 2016-2018, resigned over a vote-buying scandal and detained last week
- Ollanta Humala, in office 2011-2016, accused of taking bribes from Odebrecht to bankroll his election campaign, in pre-trial detention in Peru
- Alan García, in office 2006-2011, suspected of taking kickbacks from Odebrecht, sought asylum in Uruguay's Lima embassy but had his request denied
- Alejandro Toledo, in office 2001-2006, accused of taking millions of dollars in bribes from Odebrecht, currently a fugitive in the US