The man who once ruled Pakistan now finds himself a prisoner in his own home.
Pervez Musharraf's gamble to make a political comeback, after years of living in exile, has gone spectacularly wrong.
Musharraf returned to Pakistan last month to compete in elections to, in his words "save Pakistan".
"I would rather have seen him [Pervez Musharraf] contest elections and get defeated before the people of Pakistan because right now these cases are really the tip of the iceberg for him. And I think he really misjudged the mood in the country and in the power centres, in the media and in the judiciary."
- Zahid Ebrahim, Supreme Court lawyer
But he has been disqualified from participating, there has been no hero's welcome, and no mass show of support. He has been humbled time and again and has now hit a new low.
Police arrested him during the night, took him before a magistrate, who ordered that he be placed in custody for two days. He was taken back to his home in Islamabad and was essentially put under house arrest.
Musharraf is accused of violating the constitution by placing dozens of judges and lawyers under house arrest during his 2007 confrontation with the judiciary.
He has also been accused of treason for suspending the constitution and imposing emergency rule. And he faces other legal challenges, including being accused of failing to provide adequate security for Benazir Bhutto, Pakistan's former prime minister, who was assassinated in 2007.
It is a spectacular fall from grace for Musharraf, a man who has experienced the highs and lows of life in power.
He was made army chief by Prime Minister Nawaz Sharif in 1998. But the two men fell out. Musharraf seized power the following year, a day after Sharif sacked him.
"I think he was living in a world of make-believe and ... he was power-drunk and still has not been in touch with reality in Pakistan. He has a very poor following in Pakistan and at the moment I think the people in Pakistan are interested in the political process. They want new faces, they want the political parties to get strengthened and I think he did not get this feedback from those people who were his supporters, if there were many."
- Talat Masood, former Pakistani military general
Musharraf took the presidency, and kept his position as army chief. He was lauded by some for bringing stability. But support for Musharraf began to wane after he agreed to endorse what George W Bush called the 'war on terror' after the September 11 attacks on the United States.
By 2007 Musharraf's relationship with the judiciary collapsed. He imposed a state of emergency and sacked or imprisoned dozens of judges and lawyers including the Chief Justice Iftikhar Muhammad Chaudhry.
And faced with threats of impeachment, he resigned as president shortly before the 2008 elections. He was succeeded by Benazir Bhutto's widower Asif Ali Zardari, who along with Musharaf's old rival Sharif continued to press for his prosecution.
Musharraf is now, to some extent, in the hands of some of his old enemies in the judiciary. The firing and placing under house arrest of Chief Justice Chaudhry in 2007 sparked protests by Pakistani judges and lawyers across the country.
Later that year, the state of emergency saw troops storm the supreme court and arrest a number of top judges. The mass protests that followed played a big part in Musharraf's downfall.
So with all this hanging over his head, why would Musharraf return to Pakistan? And is revenge playing a part in the judicial action that has been brought against him?
To discuss this, Inside Story with presenter Mike Hanna is joined by guests: Zahid Ebrahim, a lawyer and advocate of the Supreme Court of Pakistan; Makhdoom Babar, president and editor-in-chief of the English publication, The Daily Mail Pakistan; and Talat Masood, a former military general of the Pakistani Army.