A day after Musharraf fled a courtroom in dramatic circumstances to his fortified villa on the edge of the capital, Islamabad, police took him to court in the central part of the city, where a magistrate placed him under arrest. Hours later, after briefly returning home, he was taken to the city police headquarters, where he was being held pending his next court appearance on charges relating to his battle with the country's top judges while in office.
The travails of Musharraf, 69, a former army chief, furthered the humiliation of a figure who enjoyed absolute power in Pakistan for much of his rule, from 1999 to 2008. But it also raised new questions about why he returned to the country in the first place.
Little has gone well for Musharraf since he returned last month from four years of self-imposed exile, spent mostly in London and Dubai, the United Arab Emirates. Shortly after his arrival, a critic flung a shoe at him in public. Since then he has been mostly confined to his Islamabad villa, protected by a sizable security contingent guarding against the possibility of an attack by the Taliban, who have threatened to kill him.
Musharraf's fledgling political party, the All Pakistan Muslim League, failed to gain traction, and on Tuesday, the national election commission disqualified him from running for Parliament in elections scheduled for May 11. Until the drama of recent days, the news media had largely ignored him. Even his former comrades in the military appear to privately view him as more of a liability than an asset.
"Musharraf obviously overestimated his popularity," Raza Rumi, a political analyst, said in an interview. "He was delusional in thinking he could ride out the storm, and he underestimated the resolve of the judges."
"There are certainly people in urban Pakistan who think that things were better during his tenure," Rumi added. "But the majority do not find him a credible leader. He ruled on the strength of his uniform. Now that uniform is gone, and Pakistan has changed."
By late Friday, Musharraf was being detained on the grounds of the Islamabad police headquarters, in a guesthouse that is normally used to house visiting police officers. In a statement, a spokesman for Musharraf attributed his woes to "segments of overzealous judiciary, unscrupulous lawyers and fictitious petitioners" who were conspiring to prevent him from being elected.
The current case against Musharraf centres on his controversial decision to dismiss and place under house arrest Pakistan's top judges in November 2007, when he declared emergency rule in a bid to shore up his crumbling authority.
Separately, he faces charges in relation to the murders of Benazir Bhutto, the former prime minister, and Nawab Akbar Khan Bugti, a nationalist leader of Baluchistan province.
And some critics are even calling for him to be tried for high treason, a charge that carries a mandatory death penalty.
The Supreme Court is hearing arguments about whether treason charges can be filed, although it appears that little can happen without the acquiescence of the current caretaker government.
That interim administration, which has little political weight, has tried hard to distance itself from the case, apparently preferring that the matter be taken up by the next elected government.
Ahmer Bilal Soof, the interim law minister, said the legal developments against Musharraf were taking place "hour by hour." The Interior Ministry will submit a statement on the treason charges to the Supreme Court on Monday, he added.
Aides have portrayed Musharraf as relaxed, saying he had been smoking cigars at his villa since his dramatic courtroom dash on Thursday.
But that unflappable image was challenged Friday when he returned to the Islamabad court, stone-faced and surrounded by tight security.
In a statement, Musharraf criticized the charges as "politically motivated" and vowed to fight them in court, "where the truth will eventually prevail."
The U.S. government, which had closely allied with Musharraf after the September 2001 terrorist attacks, moved to distance itself from him. In a statement, the U.S. Embassy stressed that it took "no position" on Musharraf or the legal proceedings against him.
Musharraf's hopes for a political comeback now appear to be in shreds. He may have come home because he "hasn't made his peace with being an ex-dictator," said Cyril Almeida, a columnist with Dawn, a Pakistani newspaper.
"Once one of the most famous statesmen on Planet Earth, he probably misses the power and the limelight terribly," he said.
Musharraf's case has shaken the country's political system at a delicate time. The sight of a former military leader being hauled through the courts is a striking image in Pakistan, where generals have ruled for about half of the country's 66-year history.
No former military leader has ever been prosecuted in court for his actions while in power, although one, Gen. Yahya Khan, was placed under informal house detention for much of the 1970s after he lost the civil conflict that resulted in Pakistan's eastern wing seceding to become Bangladesh.
Now Musharraf is partly at the mercy of his nemesis, Chief Justice Iftikhar Muhammad Chaudhry, whom Musharraf fired in 2007, setting off street protests that eventually led to his ouster.
Under Chaudhry, the Supreme Court has aggressively asserted its authority over the last year, having one prime minister fired and taking to task senior retired generals for their actions in rigging previous elections.
The country's political leaders, including Nawaz Sharif, the opposition leader who is the favorite to become the next prime minister, have remained conspicuously silent about Musharraf.
Although Sharif had previously demanded that Musharraf face treason charges, he is believed to have come under pressure from the government of Saudi Arabia, which quietly wields considerable influence in Pakistan, to leave Musharraf, a retired four-star general, alone.
Many analysts view the prospect of treason charges with trepidation, fearing that they could prompt a more aggressive military role.
"Pakistan needs to punish people who abrogate the Constitution, but it must not be personalized," Rumi said. "A whole crew of civilian and military personalities were involved in the process. Justice can only be done if all of them are taken to task."
(Salman Masood contributed reporting)