Pakistani police arrest Pervez Musharraf in Islamabad
Pakistan's former military ruler Pervez Musharraf has been arrested on charges relating to the unlawful detention of judges in 2007.
He appeared at a district court on Friday morning amid heavy security.
He was initially placed under house arrest at his home in Islamabad but later transferred to the police headquarters in the city.
Mr Musharraf has described the cases against him as politically motivated.
Thursday's order to arrest him was an unprecedented move against a former army chief who ruled the country for almost a decade, the BBC's Orla Guerin in Islamabad says.
Although he was present at court when the warrant was issued, police made no attempt to arrest him and he rapidly returned to his home on the outskirts of the city.
He was finally arrested on Friday morning and appeared at court, where a judge ruled that he should be held in custody for two days.
The decision to move him from his home to police headquarters appears to be largely procedural. He is expected to appear before an anti-terrorism court in the next 48 hours.
His legal team have said they will challenge the order in Pakistan's Supreme Court.
Meanwhile, members of Pakistan's Senate passed a resolution that the former president should be tried on charges of high treason relating to his declaration of a state of emergency in 2007.Candidacy rejected
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.
Earlier this week his candidacy was rejected in Chitral, one of four seats he had applied to contest.
Mr Musharraf had already failed in an attempt to stand in three other seats.
The case for which he has been arrested relates to his controversial decision to dismiss judges - including Chief Justice Mohammad Iftikhar Chaudhry - when he imposed emergency rule in 2007.
He also faces several other criminal cases and had been trying to stave off arrest ever since he returned.
The Pakistani Taliban have also vowed to assassinate the former president, who seized power in a 1999 coup.