Pakistani attack helicopters and artillery pounded militant hideouts on Monday following clashes between rebels and security forces in the tribal belt bordering Afghanistan, officials said.

A group of up to 100 militants ambushed government security forces en route to Mir Ali, one of the main towns in the semi-autonomous tribal region of North Waziristan, which triggered a gunfight, local police said.

"Five militants were killed and three soldiers sustained serious injuries in the clashes," police official Asmatullah Khan told AFP.

A senior security official in the area confirmed the incident. The militants who fled after the gunbattles took away two bodies but said three corpses were in the custody of security forces.

Attack helicopters shelled militant hideouts in the area immediately after the incident, said a second security official on condition of anonymity.

"Artillery also fired mortars on hideouts and a curfew was imposed in the whole of North Waziristan," local government official Asghar Khan told AFP.

The region neighbours South Waziristan, the redoubt of Pakistan's chief Taliban warlord Baitullah Mehsud, whose movement appears to have been flung into turmoil following his believed death in a US drone attack last week.

Pakistani analysts say that Mehsud's purported killing will put renewed pressure on the government to clampdown on Islamist militants holed up in the tribal belt and assert more control over the wild, semi-autonomous terrain.

Hundreds of Islamist fighters are believed to have fled Afghanistan into Pakistan's semi-autonomous tribal areas to carve out safe havens after the US-led invasion toppled the hardline Taliban regime in Kabul in late 2001.

Pakistani troops have fought increasingly against Taliban militants in recent years, with the country suffering from a deadly Islamist backlash that has killed about 2,000 people in bomb attacks in the last two years.