Pakistan's former President and military ruler Pervez Musharraf arrives to present party manifesto leaflets to candidates at his residence in Islamabad, on April 15, 2013. An appellate panel in Peshawar disqualified Musharraf from running for a parliamentary seat. (B.K. Bangash/AP)

Former Pakistani military ruler Pervez Musharraf, who returned to his homeland from exile last month pledging to become its next prime minister, was barred from the race Tuesday by a top court.

A three-judge panel in Peshawar disqualified Musharraf from running for a parliamentary seat in a northwestern district, though election officials had approved his candidacy Sunday. The court was persuaded by arguments that the former president had violated the constitution while trying to extend his rule, said Qazi Muhammad Anwar, a lawyer representing voters in the case.

Musharraf, who after nine years in power left Pakistan in 2008 under threat of certain impeachment, also has been barred from running for three seats in other districts in which elections officials have ruled him unfit for office. Some legal challenges have invoked a requirement that candidates be of “good character.”

Musharraf’s campaign blamed the disqualifications on biased electoral officials, noting that they are drawn from the judiciary, which opposed his crackdowns on judges, lawyers, the media and political foes who objected to his increasingly autocratic rule.

“We were anticipating this from the very beginning,” said Aasia Ishaq, spokeswoman for Musharraf’s campaign.

The electoral districts that had barred Musharraf earlier cited pending court cases against the former general, which include treason charges and allegations of involvement in the 2007 assassination of former prime minister Benazir Bhutto. Musharraf has strenuously denied the accusations.

The Peshawar High Court judges’ reasons for the new ruling, relating to the race in the remote Chitral district, were not made public. But Anwar said he cited previous Supreme Court rulings that Musharraf had violated his oath as an army officer and subverted the constitution when he declared emergency rule in November 2007.

“He has to face the music,” the lawyer said.

Ishaq said Musharraf’s party, the All Pakistan Muslim League, would appeal the ruling to the Supreme Court and would still field candidates in the historic May 11 election, which would bring the first transition of elected governments in Pakistan’s history.

Militant attacks on campaigning politicians have increased in recent days, particularly against the secular Awami National Party, which is dominant in strife-torn Khyber Pakhtunkhwa province, adjoining the tribal belt. A suicide bombing at a party rally Tuesday killed at least nine political workers and injured 50 others, officials reported. The party opposes the Pakistani Taliban, which is fighting to overthrow the government.

The chances of Musharraf resuming his campaign seem as slim as his prospects for victory. He has found little public support since his return from Dubai, his home in exile, along with London.

Musharraf can seek a stay of the Peshawar High Court ruling, but the process would probably drag on beyond the election, said S.M. Zafar, a lawyer and constitutional expert. “Legally, he can go to higher courts, but practically, he seems to be out of the race,” Zafar said.

On Monday, Musharraf unveiled the platform of his party and reiterated why he had returned to the country despite the risk of jail and death at the hands of militants who say they have assembled a special squad to kill him.

“The only thing in my heart was to save Pakistan,” he told reporters. “And now [that] I am here, I have the same commitment, that I will save Pakistan.”