Islamabad ( CNN ) -- Former Pakistani President Pervez Musharraf was remanded in custody for two weeks Saturday by an anti-terrorism court over allegations he illegally ordered the detention of judges in 2007 . His appearance had been ordered by Pakistan 's High Court , which on Thursday ruled that his alleged actions amounted to an act of terrorism . After a 20-minute hearing , the anti-terrorism court in Islamabad placed Musharraf on judicial remand for 14 days . His next court appearance in the case is set for May 4 . As the former president left the court , there were clashes between anti-Musharraf lawyers and a small pro-Musharraf crowd . Authorities decided Musharraf will be held under house arrest at his farmhouse compound in Chak Shazad , outside the Pakistani capital . He will be moved from police headquarters , where he was whisked after his court appearance , to the farmhouse , police officials said . The farmhouse has been converted into a `` sub jail , '' Musharraf 's lawyer , Ahmed Raza Qasoori , said Friday . Musharraf spent Friday night at police headquarters following his appearance before a magistrate earlier in the day , after which he was initially allowed to return to the farmhouse . Musharraf will continue to seek bail in the case , his lawyer said . An attempt on Thursday to appeal the High Court 's decision at the Supreme Court appeared to have so far been unsuccessful . The former president denies the charges against him and never gave any order to detain or abduct the judges in 2007 , said Mohammad Amjad , a spokesman for his political party . The development is the latest setback for Musharraf since the former military ruler returned to Pakistan last month to fight a series of court cases against him and re-enter the country 's turbulent political scene by seeking to run in upcoming elections . His arrest highlights the increased willingness of Pakistan 's judiciary , which clashed with Musharraf during his time in power , to pursue cases against high-profile figures previously considered to be untouchable . No former Pakistani army chief has previously been arrested and detained . Amid a long-running fight with the judiciary , Musharraf resigned as president of Pakistan in 2008 after nine years in power and went into exile the following year , living in London and Dubai . He came back to Pakistan last month under heavy security . But so far , his return does not seem to be going according to plan . Last week , Pakistani election officials barred him from running for a seat in parliament in elections next month , a decision his lawyer has said he will challenge . The ex-military strongman still has to face two separate other cases dating from his time in power . The first relates to claims he did not do enough to protect the life of Benazir Bhutto -- the first woman to be elected prime minister of Pakistan -- after she was assassinated in 2007 , weeks before an election in which she hoped to return to office . Musharraf is also accused of ordering his troops to kill Nawab Akbar Bugti , a popular tribal leader , in the volatile province of Balochistan , in 2006 . CNN 's Nic Robertson reported from Islamabad and Laura Smith-Spark wrote in London . CNN 's Jethro Mullen , Aliza Kassim , Nasir Habib and Shaan Khan contributed to this report .
NEW : A court orders Pervez Musharraf to be held in judicial custody for two weeks . NEW : The former president will be placed under house arrest at his residence , officials say . He is accused of illegally ordering the dismissal of senior judges in 2007 . A spokesman for Musharraf , who also faces other court charges , says he denies the charges .