Pakistani police have taken former president Pervez Musharraf into custody at their Islamabad headquarters.

The move came hours after a court had ordered him placed under house arrest, Mr Musharraf's spokesman said.

He said police had escorted the former army chief from his residence on the edge of the capital to a guest house at the city's police headquarters where he will spend two days on remand ahead of a court hearing.

Mr Musharraf was moved because a senior police official had failed to issue paperwork needed to comply with the judge's order to detain him at his home.

There was no immediate comment from police.

One of Musharraf's lawyers said he would file a petition to overturn the arrest order at the Supreme Court.

General elections to be held in Pakistan next month will be the first transition between elected civilian-led governments.

Mr Musharraf is accused of violating the constitution by placing judges under house arrest during the 2007 confrontation with the judiciary, when he sacked the chief justice and lawyers fought running battles with police.

He has also been accused of treason for his decision to suspend the constitution and impose emergency rule.

He also faces a raft of other legal challenges, including allegations that he failed to provide adequate security to prevent the assassination of former prime minister Benazir Bhutto in 2007.