ISLAMABAD: In a severe jolt to former Pakistan military ruler

Pervez Musharraf

's plans to stage a political comeback, a court on Tuesday banned him from contesting elections for the rest of his life for abrogating constitution twice and detaining judges during the emergency in 2007.

A four-judge bench of the

Peshawar high court

headed by chief justice Dost

Muhammad Khan

imposed the ban while dismissing Musharraf's appeal challenging the rejection of his nomination papers for May 11 general election.

The lifetime ban was imposed because Musharraf had abrogated the Constitution twice and detained judges during the 2007 emergency, the bench said.

Musharraf was barred from contesting polls to the national and provincial assemblies and the Senate, it said.

One of Musharraf's lawyers, Saad Shibli, says he would challenge the ruling in the Supreme Court.

Election authorities had earlier rejected Musharraf's nomination papers for four parliamentary seats in Islamabad, Punjab, Sindh and Khyber-Pakhtunkhwa because of his actions while in power.

Musharraf's lawyers had filed an appeal in the Peshawar high court against the rejection of nomination papers for a parliamentary seat in Chitral region of Khyber-Pakhtunkhwa province.

The 69-year-old former president is currently being held at his farmhouse on the outskirts of Islamabad, which has been declared a sub-jail, after he was arrested over the sacking of judges during the 2007 emergency and the assassination of former premier Benazir Bhutto.

An anti-terrorism court in Rawalpindi today remanded Musharraf to judicial custody for a fortnight over the Bhutto assassination case.

He has been accused of providing inadequate security to Bhutto after she returned to Pakistan from self-exile in 2007.

Musharraf, who heads the All

Pakistan Muslim League

, returned to Pakistan last month after nearly four years in self-exile to make a political comeback but he has been dragged to court over several issues, including the imposition of emergency rule in 2007 and the death of Baloch leader Akbar Bugti in a 2006 military operation.