Islamabad: In some of the most socially conservative regions of Pakistan this weekend’s local government elections will be men-only affairs.

Local politicians and elders say parties contesting elections for district and village council seats in Hangu and parts of Malakand, districts of the north-western province of Khyber Pakhtunkhwa (KP), have struck deals barring women from voting.

There are fears of similar arrangements across KP, a province bordering Afghanistan where many Pashtun communities observe purdah traditions so strict that many female candidates do not publish photographs on election posters.

The cultural difficulties are often compounded by dire security in areas where the Taliban and other militant groups are active. In a parliamentary by-election in Lower Dir this month, none of the eligible 50,000 women in the constituency turned out to vote. One report said mosques broadcast warnings to women, and polling stations were guarded by “baton-wielding men” who blocked the few women who did try to vote.

On Wednesday, the high court in Peshawar threw out a petition lodged by 12 women from Lower Dir who demanded the election be rerun. Shahab Khattak, the women’s lawyer, said the case was dismissed after 15 minutes, during which the judge seemed unsure whether women really were entitled to vote.

“The honourable judge asked whether it was a fundamental right for women to vote,” Khattak said. “We said indeed it is a fundamental right and a constitutional right.

“That there has been massive discrimination against women should be clear from the zero participation at the polls.” Siraj ul-Haq, leader of the Jamaat-e-Islami, an Islamist party that jointly controls the KP government, argued that the women of Lower Dir had merely chosen to respect local traditions by not voting.

Jamaat-e-Islami governs KP in coalition with the Pakistan Tehreek-e-Insaf (PTI), which is led by the former cricketer Imran Khan. One of the PTI’s elected provincial representatives said the party had been complicit in keeping women away from the ballot box in KP, including in this weekend’s poll in Hangu.

In the run-up to the 2013 general election, the PTI in Upper Dir signed a written agreement with other parties barring women from voting and stipulating large fines for anyone breaking the agreement. In the end just one woman’s vote was recorded.

Ijaz Khan, a professor at Peshawar University, said political parties were to blame for not challenging social pressures in the most “backward” areas of the province. “In order to win the seat they refuse to take a strong stance with their local chapter,” he said. “The PTI may have women who go to their meetings in Islamabad or Lahore, but in the more traditional areas the party compromises on women’s rights.”

The courts and the provincial government have shown little interest in pursuing the issue of the Lower Dir by-election, but the election commission is investigating. It said it had taken “serious notice” of reports that women would be prevented from voting this weekend.

Saima Munir, of the Aurat Foundation, a campaign group, said that if the election commission nullified the result and disqualified the winning candidate it would force dramatic change in the province.

Nida Khan, a women’s activist in Hangu, said elders in her community would continue to act with impunity. “There is no government writ in Khyber Pakhtunkhwa,” she said. “We don’t need any Taliban since our so-called politicians with their extremist mindset are enough to push women into the dark.”