To his supporters, Alberto Fujimori was the president who saved Peru from the twin evils of terrorism and economic collapse. To his opponents, he was an authoritarian strongman who rode roughshod over the country's democratic institutions in order to preserve his hold on power.
The son of Japanese immigrants, Mr Fujimori's decade in power from 1990 to 2000 in which he ruled with an iron fist was marked by a series of dramatic twists and turns.
His authoritarian government's crackdown on two violent insurgencies during his tenure resulted in the deaths of an estimated 69,000 people.
Several years after his presidency ended, Mr Fujimori was found guilty of bribery and abuse of power and was sentenced to 25 years in prison for human rights abuses during his time in office - including authorising a number of killings carried out by death squads.
Health issues lead to pardon
Sentenced to 25 years in prison in 2009 at the age of 70, most Peruvians assumed the former leader would spend the rest of his life in jail.
But in December 2017, the 79-year-old was taken from prison to a hospital in the capital, Lima, because of health concerns; he was suffering from low blood pressure and abnormal heart rhythm.
That same month, Mr Fujimori was granted a pardon by President Pedro Pablo Kuczynski after doctors said his illness was incurable, adding that prison represented a "grave risk to his life".
Al momento de recibir la noticia... pic.twitter.com/SLMeDhxlNt— Kenji Fujimori (@KenjiFujimoriH) December 25, 2017
In response, Mr Fujimori said he was "deeply grateful" and that while his leadership was well received by some, he recognised that he had "let down others", adding: "Those I ask for forgiveness from the bottom of my heart."
He also called for the country to unite against crime and violence. "We'll be in a country in which security is regained and violence eliminated," he tweeted.
The news of his pardon was both celebrated and demonstrated against with thousands taking to the streets of Lima. The minister of culture and the defence minister resigned over the pardon.
Within days Mr Fujimori was released from hospital a free man, waving at media from his wheelchair accompanied by his son, Kenji Fujimori.
President's iron fist
One of the key moments of his presidency was the hostage siege by Marxist rebels belonging to the Tupac Amaru Revolutionary Movement (MRTA), which occurred at the Japanese ambassador's residence in Lima in 1996-97.
After a four-month stand-off, commandos were sent in to take the building.
All 14 rebels were killed and nearly all the 72 hostages were rescued in an operation that at the time cemented Mr Fujimori's talking and acting tough.
The president's reputation was later tarnished by a bribery scandal involving former intelligence chief Vladimiro Montesinos, which led to him fleeing to his parents' native Japan in November 2000, where he lived for five years in self-imposed exile.
In an effort to resurrect his political career and launch a new bid for the presidency, he flew to Chile in November 2005, only to be arrested at the request of the Peruvian authorities.
Mr Fujimori then spent two years fighting to block his extradition to face a series of charges, a battle he lost in September 2007.
He was convicted and sentenced to six years in jail in December 2007 on charges of abuse of power, over the removal of sensitive video and audio tapes from Mr Montesinos's home.
In April 2009, judges found him guilty of authorising death-squad killings in two incidents known as La Cantuta and Barrios Altos, and the kidnapping of a journalist and a businessman.
Mr Fujimori repeatedly denied the charges, saying they were politically motivated.
Alberto Fujimori: Key dates
- 1990: Wins a surprise victory at polls
- 1992: Dissolves Peru's congress with military backing, assuming greater control
- 1995: Restores congress and overwhelmingly wins a second term
- 2000: Re-elected for a third term amid allegations of ballot rigging
- 2000: Flees to Japan after Montesinos scandal breaks
- 2005: Detained in Chile at the Peruvian authorities' request
- 2007: Extradited from Chile to face trial in Peru
- 2007: Jailed for six years for abuse of power
- 2009: Convicted of human rights abuses, jailed for 25 years
- 2013: Request for pardon on humanitarian grounds is rejected by President Humala
- 2017: Pardoned on health grounds, prompting protests
- 2018: Ordered to stand trial for the 1992 killings of six farmers
A country in ruins
Mr Fujimori's 15-month trial and the divisions in public opinion it generated echoed the controversy that accompanied him throughout his political career.
When he won the presidential elections in 1990, few Peruvians knew what to expect.
An agricultural engineer born of Japanese parents, Mr Fujimori was a political unknown until weeks before the vote.
He inherited a country on the verge of economic collapse and racked by political violence.
He implemented a radical programme of free-market reforms, removing subsidies, privatising state-owned companies and reducing the role of the state in almost all spheres of the economy.
Though this shock therapy brought great hardship for ordinary Peruvians, it ended rampant hyperinflation and paved the way for sustained economic growth in the second half of the 1990s.
Mr Fujimori also tackled the left-wing rebels whose 10-year insurgency had caused thousands of deaths. But he says he never approved a dirty war against the rebels.
In 1992, with the support of the military, the president dissolved the Peruvian congress and courts and seized dictatorial powers.
He justified the measure by arguing that the legislative and judiciary had been hindering the security forces in their fight against the rebels.
Opposition politicians said he was really seeking to escape any democratic checks on his power.
But he was soon vindicated in the eyes of most Peruvians by the capture of the leader of the main rebel group, the Shining Path.
In 1995, Mr Fujimori stood for re-election and won an overwhelming victory. Most voters cited his victories over left-wing insurgents and hyperinflation as the reason for giving him their support.
But a growing number of Peruvians began to voice concern that the methods used against the insurgency were also being employed against the president's democratic opponents.
His critics accused him of using the intelligence service led by Mr Montesinos to intimidate and spy on rivals.
They said he exerted unfair control on the media and the judiciary, and used government resources to support his own campaigns.
This criticism increased when he announced he was to stand for an unprecedented third successive term.
Although he won the May 2000 elections, amid further allegations of vote-rigging, the prized third term began the start of his downfall.
After the Montesinos scandal broke, the opposition gained control of Congress for the first time in eight years and dismissed Mr Fujimori on grounds of "moral incapacity".