The initial attack involved mortars and rocket fire which sparked fierce gun battles at the fort at Mamad Gate, where members of Pakistan's elite Quick Reaction Force are stationed.

Escalating violence

The security official, who spoke on condition of anonymity, said that most of the attackers eventually fled the scene, but at least 40 were killed and many more surrendered or were arrested.

The border region is a key battleground in the so-called "war on terror", with Taliban and al-Qaeda-linked fighters said to be operating bases in northwestern Pakistan's tribal areas from which they send fighters to attack Nato and US forces in Afghanistan.

Many militants are thought to have fled there after the US-led invasion that overthrew the Taliban government in Afghanistan in 2001.

"There has been a significant escalation of violence in the region, next to Bajaur, where police forces have been able to bring some sort of control," said Al Jazeera's correspondent Kamal Hyder.

"There is a thinking that militants might move to Mohmand," he said. "Pakistani forces are determined to hold that border region."

Abduction

Also on Sunday, suspected militants abducted a senior local government official in South Waziristan, another border area south of Mohmand, according to intelligence staff.

Gunmen in four vehicles are reported to have stopped a convoy in which the official, Amir Latif, was travelling, 30km east of the regional centre of Wana. They bundled Latif into one of their vehicles and drove off.

In December, militants in neighbouring North Waziristan abducted another government official, Asmatullah Wazior, from the Mir Ali district.

The whereabouts and condition of both men is still not known.

Key battleground

Last week, Hamid Karzai, the Afghan president, told Asif Ali Zardari, his Pakistani counterpart, that the two countries had a "new relationship" and determination to defeat "terrorism and extremism".

Karzai had previously accused Islamabad of not doing enough to shut down militant "sanctuaries" in the tribal areas and stop insurgents from crossing into Afghanistan.

Pakistan rejected the accusations, pointing to its operation against fighters in the Bajaur region, which borders Mohmand and Afghanistan, where the military says more than 1,500 rebels have been killed since August.

In late December, Pakistan also mounted a major offensive in the Khyber tribal area south of Mohmand to clear militants from the area along a key road used by trucks ferrying supplies to Nato and US-led troops in Afghanistan.