A homicide bomber pretending to need help with his car killed 26 people in northwest Pakistan on Sunday, officials said, underscoring concerns that militant violence near the Afghan border could escalate now that Pakistan is shifting troops away from the region toward India.

The explosion at a polling station also wounded 15 people in Buner, a district bordering Swat, a valley where Pakistan's army has waged a stop-start offensive against insurgents for more than a year, police official Beharmand Khan said. The building targeted was a school, where voters were casting ballots in a by-election for a National Assembly seat.

"The suicide attacker pulled his car outside the polling station, and asked people to push the vehicle, saying that it had broken down. His purpose was to gather the maximum people around the car. The moment people started pushing the car, he blew it up," said Mian Iftikhar Hussain, the information minister of the North West Frontier Province.

He said the attack was a message to the world that: "It is not possible to hold a peaceful election in this country."

The bombing followed reports that Pakistan's army has restricted military leave and was redeploying thousands of troops away from the northwest — where many Al Qaeda and Taliban militants are based — toward the eastern border with India amid tensions over last month's attacks in Mumbai.

India blames Pakistani militants for the slaughter of 164 people in its commercial capital, and it has not ruled out force. But leaders of both nuclear-armed countries insist they want to avoid what would be their fourth war.

Leading Pakistani newspapers warned in editorials Sunday that Pakistan is taking a huge gamble if it lets the deteriorating relations with India distract it from battling militants in the northwest, where it also is engaged in an offensive in the lawless tribal belt.

Pakistan "just cannot afford to redeploy any large number of its troops on the eastern border, leaving the 'wild' west in a free fall," wrote Dawn, a leading English-language paper. "Isn't that the area where the world's best intelligence says the extremist militants are holed up in significant numbers and planning to strike targets everywhere? They cannot be allowed a breather at a time when military operations are ongoing to clear the area of their roguish presence."

Pakistan and India have fought three wars since their independence from Britain in 1947 — two over Kashmir, a majority Muslim region in the Himalayas claimed by both countries. But most analysts say another war is unlikely because both countries have too much to lose. Some speculate, however, that the Mumbai attackers sought to distract Pakistan from its troubles along the Afghan frontier.

Pakistan has said it would not launch a first strike, but its troop redeployment was seen as an indication that it will retaliate if India tries to take out militant targets on Pakistani soil.

Daily Jang, a major Urdu-language newspaper, put the onus on the United States, which considers Pakistan a critical ally in its efforts to stem the growing Taliban insurgency in Afghanistan and which has sent envoys to South Asia to try to defuse tensions.

"It is in the interest of America to stop India from making the situation worse, so that Pakistan is not forced to withdraw all of its troops from tribal areas as a last resort," the paper wrote.

Two Pakistani intelligence officials — requesting anonymity because of the sensitivity of the situation — said Friday that elements of the army's 14th Infantry Division were being redeployed from Waziristan in the northwest to Kasur and Sialkot, towns close to India.

Witnesses reported seeing long convoys carrying troops and equipment toward India on Thursday and Friday.

Another intelligence official, also speaking on condition of anonymity, said Saturday that up to 1,300 troops had also been pulled out of the Bajur region. Their final destination was not immediately known.

The army has refused comment on any troop movements, but a senior Pakistani security official Friday denied that soldiers were being deployed to the Indian border.

Meanwhile Sunday, in North Waziristan tribal region, another militant stronghold in the northwest, police said the bullet-ridden bodies of three people, including an Afghan national, were found in two villages. Police official Yousuf Khan said the victims bore notes accusing them of being U.S. spies.