Pakistani Taliban fighters have killed a senior officer after opening fire at an army car near the volatile city of Peshawar on the Afghan border.

The attack on Tuesday is certain to destroy any prospects of meaningful peace negotiations between the government and the insurgents.

An attempt by representatives of both sides to meet and talk peace collapsed a day earlier after insurgents said they executed 23 soldiers in revenge for army operations in the volatile tribal region.

"(The) exchange of fire continues," the army's press wing said in a statement.

Prime Minister Nawaz Sharif made peace negotiations with the Taliban a central pillar of his rule but repeated failures to find a compromise have frustrated the nation and prompted calls for tough military action against insurgent strongholds.

Efforts to engage the banned Tehrik-i-Taliban Pakistan have been marked by increasingly surreal scenes this month, with Taliban representatives trying to distance themselves from the violence and both sides issuing acrimonious statements.

Talks "meaningless now," government says

The government's representatives met Sharif in Islamabad on Tuesday and said they felt unable to talk to the Taliban any more.

"The situation has completely changed after the Mohmand incident and the committee is unable to carry forward peace talks until the Taliban cease all violent activities," the prime minister's office said in a statement, referring to the tribal Mohmand district.

"The committee told the PM that they have unanimously decided not to hold scheduled talks with the Taliban committee as it is meaningless now."

The army identified the killed senior officer as Major Jehanzeb and said three militants were also killed.

A Peshawar Taliban official confirmed the attack but there was no word from the movement's main spokesman.

"Militants attacked the convoy of a security official in Peshawar and killed one army major," said the official.

Pakistan watchers doubt talks with the outlawed militant group, which has killed more than 40,000 since its creation in 2007, can ever bring peace in a country where the Taliban are fighting to topple the government and set up an Islamic state.

Persistent violence also highlights the inability of the Taliban's central leadership, which has agreed to hold negotiations, to control its fringe groups and enforce a temporary ceasefire.