The government of Afghanistan has rejected Pakistan's claim that an attack on a military base near Peshawar was planned and controlled from Afghanistan.

A statement from Kabul's presidential palace on Saturday said it never had and never would allow its territory to be used against other states.

Pakistani authorities blamed fighters from neighbouring Afghanistan for the attack on Badber military base on Friday that killed 29 people and was claimed by Pakistani Taliban.

Gunmen stormed the airbase, about 10km south of Peshawar in an attack, a Pakistani Taliban spokesman said was retaliation for bombing raids on their bases along the Afghan border.

Army spokesman General Asim Saleem Bajwa said the attackers came from and were being handled by superiors in Afghanistan, but he stressed he did not mean the government in Kabul was behind the assault.

The Afghan government statement said Kabul and Islamabad "should continue working together to eliminate the threat of terrorism".

Pakistani jets killed 16 suspected fighters in bombing raids near the Afghan border on Saturday, and police arrested dozens of people, security officials said, the day after Taliban fighters killed 29 people in an attack on an airbase.

Pakistani police said they picked up around 50 residents living near the base on suspicion of helping organise the attack.

Source: Agencies