Taliban militants have kidnapped more than 30 Pakistani boys who had mistakenly crossed the unmarked border in the country's lawless north-west into Afghanistan, officials said.

They said the incident took place on Thursday (local time) after the group of boys, aged between 12 and 18, visited the area of Gharkhi in Pakistan's Bajaur tribal region for celebrations marking the Muslim Eid holiday.

"These boys inadvertently crossed into Afghanistan while picnicking on the second day of Eid and were kidnapped by militants," senior local administration official Syed Nasim said.

However, Afghan border police commander General Aminullah Amarkhel said he had no knowledge of the abduction, and the local Taliban commander in Kunar province, where the boys vanished, also said he was unaware of the incident.

Afghanistan shares a disputed and unmarked 2,400-kilometre border with Pakistan, and Taliban and other Al Qaeda-linked militants have carved out strongholds on either side.

The Pakistani military has repeatedly claimed to have eliminated the militant threat in Bajaur, one of seven districts in the semi-autonomous tribal belt the United States sees as the global headquarters of Al Qaeda.

Two local intelligence officials said the kidnappers were apparently from a militant group allied with Taliban commander Maulvi Faqir Muhammad, who led insurgents in Bajaur but is believed to have fled to Afghanistan in 2010.

Afghanistan and Pakistan blame each other for several recent cross-border attacks that have killed dozens and displaced hundreds of families.

The Pakistani military have accused Faqir Muhammad of being behind an attack on a Pakistani paramilitary check post last week, which killed 25 troops.

It said his group helped coordinate the raid adding the terrorists regrouped in the Afghan provinces of Kunar and Nuristan with Afghan support after their expulsion from Pakistan.

An escalating border war in the area is fanning tensions at a key juncture as Afghans and Americans reach out to the Taliban for peace talks.

AFP