A Pakistani court put ex-military leader Pervez Musharraf under house arrest on Friday, an unprecedented move against a former army chief of staff, after he surrendered to a magistrate.
The Islamabad High Court had ordered his arrest on Thursday over charges dating back to his 1999-2008 rule after the retired general returned to Pakistan from four years in self-imposed exile to contest historic May polls.
It is the first time that the judiciary has ordered the arrest of a former army chief of staff. Nuclear-armed Pakistan has been ruled for around half its existence by the army, considered the most powerful institution in the country.
The 69-year-old, who left court with his bodyguards, is now holed up in his plush but heavily fortified home on the edge of Islamabad, where police have massed outside.
"General Musharraf has been sent on a two-day judicial remand and he will stay at his farmhouse," said a spokesman for his All Pakistan Muslim League (APML) party.
An official at the magistrates court in Islamabad confirmed the order.
APML spokesman Muhammad Amjad said the magistrate had ordered Musharraf to appear before an anti-terrorism court in Rawalpindi after two days.
"Musharraf himself surrendered before the court Friday morning," Amjad said, denying media reports that he had been arrested prior to going to court.
Live TV footage showed Musharraf arriving dressed in a traditional shalwar kamiz and waistcoat -- a departure from his normal preference for Western clothes -- surrounded by police and paramilitary.
His team said they would seek bail in the Supreme Court later Friday.
Pakistan's top court is already hearing a petition demanding that Musharraf face trial for treason for imposing emergency law in 2007, punishable by death or life in prison.
He is also accused of conspiracy to murder opposition leader Benazir Bhutto in 2007 and over the death of a rebel leader during a 2006 military operation. He had been granted bail repeatedly since his homecoming on March 24.
It has been a humiliating return to Pakistan for the man who promised to "save" the nation from poverty and rampant insecurity by contesting the May 11 vote until judges on Tuesday disqualified him from standing.
His APML party is now considered unlikely to win any seats but his team has sought to present life as normal.
"He is in high spirits.... He is sipping coffee and smoking cigars," his lawyer Ahmed Raza Kasuri told reporters on Thursday.
Political analyst Hasan Askari warned that any arrest or trial risked overshadowing the elections, set to mark the first democratic transition of power after a civilian government has completed a full term.
"If the court starts his trial he will entangle others to save his skin. The case can go in the wrong direction and it may undermine the elections," Askari told AFP.
"The judiciary is overdoing it. It should show some restraint.... It can grant bail now and take up the case after the election which should be our primary objective," he added.
Musharraf's supporters say the arrest order was nothing more than a settling of scores for his dismissal of judges nearly six years ago.
The Islamabad High Court separately summoned the capital's police chief to explain on Friday why Musharraf has not been arrested.
On Thursday, Judge Shaukat Aziz Siddiqui said Musharraf had "spread fear in the society, insecurity amongst the judicial officers, alarm in the lawyers' community and terror throughout Pakistan".
Musharraf seized power in a bloodless coup, which was widely welcomed at the time in Pakistan, but he was forced out and threatened with impeachment in 2008.
The elected prime minister he ousted, Nawaz Sharif, is now the front-runner in the campaign for the May general election.