Before he became Philippine president, and long before his high-profile corruption trial, Joseph Estrada was known to most Filipinos as a film star.
Mr Estrada was detained after being ousted from power in 2001
The man who likes to be called by his nickname Erap is best remembered as the swashbuckling hero in Ito Ang Pilipino, which earned him a place in the Philippine movie industry's Hall of Fame.
Success in films, and the popularity it earned him among ordinary Filipinos, encouraged him to enter politics.
He ran as mayor for his home town, the Manila suburb of San Juan, in 1969, winning by an exceptionally narrow margin.
It was the start of a 16-year tenure as mayor, which was to be the launching pad for his rise to the nation's highest office.
Mr Estrada's appeal as mayor was that he was not associated with traditional politics, and was not from the wealthy elite that had previously dominated political life.
He cultivated an image as the friend of the poor, a Robin Hood figure committed to redistributing wealth and power.
In national politics he espoused the cause of poor agricultural workers, pledging to improve their lot.
ESTRADA ON TRIAL
May 1998: Joseph Estrada is elected president by the Philippines' biggest ever margin
Nov 2000: Senate opens impeachment trial of president
Jan 16 2001:Trial collapses
Jan 20 2001: Estrada quits and flees amid huge protests
Oct 2001: Estrada goes on trial for plundering state funds
September 2007: Found guilty of plunder and given a life sentenceOctober 2007: Pardoned by President Arroyo and freed
But Mr Estrada himself was a man of considerable personal wealth.
As his time in power continued, rumours surfaced about his involvement in corruption and illegal business transactions.
A provincial governor and former drinking and gambling buddy claimed he had delivered millions of dollars of cash in briefcases to the president's office.
The rumours were exacerbated by claims about his personal life. Although married for 40 years to psychiatrist Luisa "Loi" Ejercito, Mr Estrada admitted to having had a number of children by different mistresses, whom his opponents say he accommodated in palatial houses.
He was also said to make crucial policy decisions with his "midnight Cabinet" - old drinking pals who called on him at the presidential palace late at night.
Corruption allegations played into the hands of political opponents, who had him impeached and tried by the Senate.
When the trial collapsed, after some prosecution evidence was ruled inadmissible, the anger spilled on to the streets.
By the time he was ousted in a revolt backed by the Catholic Church and the army in January 2001, many of his people had turned against him.
His critics accused him of running the Philippines "like a gangland boss", using his position to buy loyalty and support.
Gloria Arroyo's presidency is still haunted by that of her predecessor
His trial got under way in October 2001, but because of the sluggish pace of Philippine justice - the court met just once a week - he only took the witness stand in March 2006.
During his trial, prosecutors claimed he plundered the country's coffers, stashing away millions of dollars in payoffs from gambling operators and government financial transactions.
But at one stage Mr Estrada proclaimed defiantly: "These are trumped-up charges, a frame-up."
The defence was concluded in August 2006, leaving judges to examine the mountains of evidence and begin deliberating on a verdict, which they finally reached in September 2007.
Mr Estrada was found guilty of plunder and given a life sentence.
But just six weeks later he was pardoned by his successor, President Gloria Arroyo, and is now an free man.