Pakistan's Pervez Musharraf in custody for two weeks
Pakistan's former leader Pervez Musharraf has been remanded in judicial custody for two weeks over claims he illegally detained judges in 2007.
Mr Musharraf, who ruled Pakistan between 1999 and 2007, was arrested on Friday.
The High Court ruled that the allegations amounted to an act of terrorism and ordered him to appear at Islamabad's anti-terror court.
Mr Musharraf has described the case against him as politically motivated.
Last month Mr Musharraf returned from years of self-imposed exile hoping to lead his All Pakistan Muslim League (APML) party into the general election next month.
Mr Musharraf's return was always a political gamble. Now it looks increasingly like a miscalculation. That surprises many who see him as an astute tactician. Some put it down to egotism - a personal conviction that he'd command public support and be swept back into power, capitalising on disillusionment with the main parties.
There's much focus on the role of the military now. It's moved on since his departure but he is still one of theirs and his arrest without bail makes him the first army chief to be put in prison. Some suggest the army saw advantages in his return - a way of dividing electoral opinion and weakening the next coalition. Others say military chiefs warned him against coming back but may still be willing to broker a compromise, perhaps by pushing him back into exile.
However, he has so far failed in his bid to register as a candidate with election officials.
His lawyers said it was unclear whether he would be detained under house arrest, in policy custody, or in jail.
APML spokesman Muhammad Amjad said Mr Musharraf would fight the allegations in a higher court.
Judges are determined to prosecute Mr Musharraf over his decision to dismiss judges including Chief Justice Mohammad Iftikhar Chaudhry.
He is accused of keeping the judges under house arrest for about six months in 2007 after he imposed emergency rule.
Mr Musharraf was brought to the court under heavy security.
The BBC's Shahzeb Jillani, outside the Islamabad court, says angry lawyers shouted slogans calling for Mr Musharraf to be tried for treason.
His supporters and opponents clashed inside and outside the court.
Mr Musharraf faces several other criminal cases and had been trying to stave off arrest since he returned.
The Pakistani Taliban have also vowed to assassinate the former president, who seized power in a 1999 coup.