Pervez Musharraf, Pakistan's first ex-military ruler to be arrested, is a washed-up political force whose dreams of a triumphant homecoming have been crushed by allegations of treason and murder.
A whisky-tippling moderate, he was a key US ally in the "war on terror" and escaped at least three Al-Qaeda assassination attempts when in office, but has been sidelined in a nation seeking to turn its back on military rule.
After more than four years of self-imposed exile in Dubai and London, he returned home on March 24, reportedly against the advice of the army, announcing to the world that he alone could "save" Pakistan from economic turmoil and chronic insecurity.
But the Taliban threatened to kill him, the local media ridiculed his ambitions and barely hundreds turned out to greet him. He moved only with bristling security. On Tuesday, he was disqualified from running for parliament.
On Friday he was forced to surrender to a magistrate over charges dating back to his rule and unceremoniously sentenced to house arrest.
As defiant as ever, he took to Facebook to say he would fight the charges, as aides painted a picture of him calmly enjoying cigars at his plush villa.
"These allegations are politically motivated and I will fight them in the trial court, where the truth will eventually prevail," he said in a statement.
In his memoir "In the Line of Fire", he quoted Napoleon and Richard Nixon as models for leadership -- men both known, among other things, for their tenacity.
But the All Pakistan Muslim League party he founded in exile with expatriates is now unlikely to win any seats at the May 11 election.
Musharraf was born in Old Delhi on August 11, 1943, and his family moved to the newly created Pakistan shortly after independence four years later. He said he had his first brush with death falling out of a mango tree as a boy.
He joined the Pakistan Military Academy at age 18 and became a commando about five years later.
He rose through the ranks and in 1998, then-prime minister and current frontrunner for the May election, Nawaz Sharif, appointed him chief of staff.
As army chief, Musharraf orchestrated the brief, high-altitude "Kargil conflict" in Kashmir that almost took nuclear rivals India and Pakistan to war.
When he ousted Sharif in 1999 in a bloodless coup, many Pakistanis handed out sweets to celebrate the end of a corrupt and economically disastrous administration.
Musharraf won a five-year term as president in a 2002 referendum, but reneged on promises to quit as army chief until late 2007.
He aligned with the United States after the September 11 attacks of 2001, earning international praise for trying to tackle Taliban and Al-Qaeda militants and for presiding over a period of record economic growth.
He faced no serious challenges until he tried to sack the country's chief justice in March 2007, sparking nationwide protests and months of turmoil that led to the imposition of a state of emergency in November 2007.
After the December 2007 assassination of opposition leader Benazir Bhutto, who had herself spent years in exile, the national mood soured even more and the crushing losses suffered by his allies in 2008 elections left him isolated.
On August 18, he finally resigned in the face of impeachment proceedings by the governing coalition.
Today he is wanted by the courts over Bhutto's death, the 2006 death of Akbar Bugti, a Baluch rebel leader in the southwest, and for the 2007 sacking and illegal arrest of judges. Bhutto's son, Bilawal, has accused him of her murder.
A 2010 UN report said Bhutto's death could have been prevented and accused Musharraf's government of failing to provide her with adequate protection. His administration blamed the assassination on the Pakistani Taliban.