A roadside bomb killed a Pakistani general and another officer yesterday near the border with Afghanistan, the Pakistani army said, rare high-ranking casualties in Pakistan’s war against militants.

Major General Sanaullah Khan, along with a lieutenant colonel and another soldier, were killed in the Upper Dir district after visiting an outpost near the border, the army said.

Taliban spokesman Shahidullah Shahid claimed responsibility for the bombing, which Pakistani Prime Minister Nawaz Sharif said would not affect the fight against militants.

“Pakistan army has made substantial sacrifices to protect the nation against the menace of terrorism and such cowardly acts by terrorists cannot deter the morale of our armed forces,” Sharif said in a statement.

“Maj Gen Sanaullah and Lt Col Touseef embraced Shahadat (martyrdom) this morning. They were returning after visiting troops posts on Pak-Afghan Border,” the military said in a statement.

The attack comes after weeks of discussions within Sharif’s government about whether to pursue peace talks with the Pakistani Taliban, who are separate from Afghanistan’s Taliban, although allied with them.

Last week, major political parties held a conference on the issue and agreed that talks should be pursued.

But it was not clear when talks might begin, who might take part or if they would be held under any conditions.

The killing of Khan and his colleagues would likely make it more difficult for the government to enter negotiations.

Separately, the Pakistani Taliban yesterday announced preconditions for talks on ending an insurgency that has killed thousands.

Shahidullah Shahid, spokesman for the Tehreek-e-Taliban Pakistan (TTP), had earlier welcomed the new government’s move to begin peace talks, but said yesterday it must show its sincerity.

“First of all, troops in the entire tribal area should go back to barracks and then our prisoners should be released,” Shahid told AFP.

“The Pakistan government must take steps which can develop an atmosphere of trust and can remove the doubts and suspicion. We cannot move forward unless the governments accepts these two demands.”

He was speaking after the Taliban’s shura or decision-making council held three days of talks about the government offer of dialogue.

Shura members from across the country took part in the meeting and stressed the need for confidence-building measures, the spokesman said.

Shahid did not give a figure for the number of jailed insurgents and did not totally rule out peace talks if the preconditions are not met.

But he added: “The government began a war against us and the government has to announce the ceasefire if it is really sincere in peace talks.”

Politicians last week gave their backing to Prime Minister Nawaz Sharif’s calls to begin talks with the Taliban.

Representatives from the main coalition and opposition parties, who attended an All Parties Conference, asked the government to initiate the dialogue.

Army and intelligence chiefs also attended the conference, as did representatives of secular parties that made up the previous government and had supported military operations against the rebels.

Previous peace deals with the Taliban have quickly broken down and been sharply criticised for allowing the extremists time to regroup before fresh attacks.

Two other roadside bomb attacks in Miranshah, the main town in North Waziristan tribal district bordering Afghanistan, killed two soldiers yesterday and wounded four others, security officials said.

In the neighbouring district of Bannu, Taliban militants ambushed a convoy of tribal police, killing two and wounding four others, security officials said.

Sanaullah was the general officer commanding in the Swat valley. The provincial government has announced that a troop withdrawal will start in the valley next month.

The army in 2009 sent 30,000 troops to battle Taliban fighters controlled by cleric Maulana Fazlullah, who since 2007 had taken control of the scenic Swat valley and waged a campaign of beheadings, other violence and attacks on girls’ schools.

By July 2009, the army declared the region back under control and said the rebels had all been killed, captured or fled. But more than 20,000 soldiers remained in Swat and adjacent districts in Khyber Pakhtunkhwa province.

Some security officials in Swat have voiced fears that Fazlullah and his loyalists, who escaped into eastern Afghanistan, could make a comeback in the event of a complete army pullout.

The chief minister of Khyber Pakhtunkhwa, Pervez Khattak, on Saturday approved the phased withdrawal, his spokesman Shiraz Paracha said.

In the initial stage, troops will be withdrawn from neighbouring Buner and Shangla districts in October.

A military official, speaking on condition of anonymity, confirmed the withdrawal next month of 300 soldiers from Buner and Shangla, but denied there would be a complete troop withdrawal from the Swat valley in coming months.

But the provincial government spokesman said Khattak “has signed relevant documents” and a “detailed plan of complete withdrawal will be finalised with law-enforcing agencies”.