ISLAMABAD, Pakistan — A Pakistani court disqualified Pervez Musharraf, the country’s onetime military leader and president, on Tuesday from taking part in coming national elections, dashing his hopes of rejoining Pakistani politics.

And in northwestern Pakistan on Tuesday, the Pakistani Taliban continued its campaign of violence to disrupt the elections, staging a suicide attack on a major political rally that killed at least 15 people in Peshawar.

General elections are scheduled for May 11, and Mr. Musharraf had planned to run for Parliament in four election districts across the country. His nomination papers from three of the districts were rejected in an initial review by the national election commission, as officials concluded that he had subverted the Constitution when he took power in a coup in 1999 and was therefore ineligible to run. However, he was allowed to run in Chitral, a picturesque, mountainous northern district, and his opponents had appealed that decision.

On Tuesday, a high court tribunal disqualified Mr. Musharraf from running in Chitral, citing various technicalities.