Peru's Alberto Fujimori, who died Wednesday at the age of 86, was a one-time university dean who rose to wage a bloody campaign against insurgents as president in the 1990s -- but ended up jailed for atrocities.
He was loved by many for crushing the notorious left-wing Shining Path rebels but hated by others for the ruthless, authoritarian way he governed.
Fujimori's decade as president from 1990 was marked by a dramatic series of sieges, massacres and escapades.
He ultimately ended up in jail as a frail, gray figure crippled by back pain, breathing problems and high blood pressure, for which he required frequent hospital stays.
Last year, he was released from prison on humanitarian grounds.
In July, his daughter Keiko announced that he would run for president again in 2026.
But his health deteriorated sharply after he completed treatment for tongue cancer in August, sources close to his family told AFP.
A descendant of Japanese immigrants, Fujimori was a marginal figure among political parties but cultivated the support of the armed forces.
Under him and his hardline security chief Vladimiro Montesinos, state forces virtually wiped out the Shining Path and Tupac Amaru rebels.
Fujimori also clamped down hard on his political rivals. In 1992, he staged an internal coup, dissolving the legislature with the knowledge of only Montesinos and military chiefs.
"Act first, tell people about it later," he was quoted as saying.
Born in Lima on July 28, 1938, Fujimori was an agricultural engineer by training, then worked as a university lecturer in mathematics.
He studied in France and the United States, eventually earning a Master's degree in mathematics.
Upon his return to Lima, he took a high-level post at his former university, before embarking on his unlikely career in politics.
In 1990, he defeated writer Mario Vargas Llosa to win the presidency -- a surprise result.
One of the most dramatic episodes of Fujimori's time in power was a four-month hostage ordeal at the Japanese embassy in Lima, which began in December 1996.
Commandos ended up raiding the embassy, saving nearly all the VIPs held by Tupac Amaru guerrillas and killing the 14 hostage-takers.
That strengthened Fujimori's reputation for fighting terrorism with a firm hand.
At the same time, he won popular support for boosting the economy of the South American country, a major mineral exporter.
His neo-liberal economic policies won him the support of the ruling class and international financial institutions.
But the dark side of Fujimori's supposed success was revealed when he was found guilty of crimes against humanity for two massacres carried out by army death squads.
Fujimori's downfall began in 2000 after Montesinos was exposed for corruption.
The president fled to Japan and sent a fax announcing his resignation.
Congress voted to sack him instead and ban him from public office for 10 years.
He was eventually arrested when he set foot in Chile and extradited back to Peru for trial.
A court held Fujimori responsible for the killing by the army of 25 people, including a child, during his campaign against Shining Path in 1991 and 1992.
It sentenced him in 2009 to 25 years in jail.
In a separate case, he pleaded guilty to bribing lawmakers and spying on former rivals while in power.
And in March 2021, a court opened proceedings against Fujimori over the forced sterilization of thousands of poor, mostly Indigenous women.
Fujimori's turbulent decade in office was matched by his family soap opera.
He is not the only member of his family to have run into legal troubles. His daughter Keiko has also faced corruption allegations.
Fujimori's wife Susana Higuchi divorced him in 1994 and a year later ran against him but he blocked her by passing a law prohibiting presidents' close family members from succeeding them directly in office.
Keiko took over as the nation's first lady at the age of 19.
She herself has staged three failed bids run for the presidency.
While in jail, Fujimori was in and out of the hospital with heart, back and stomach trouble. He had several operations to remove cancerous growths from his tongue.
In December 2017, then-president Pedro Pablo Kuczynski pardoned Fujimori due to his ill health.
But the Supreme Court later annulled the pardon and in January 2019, he was returned to jail from hospital.