Security forces attacked the camp in the North Waziristan tribal region after the al Qaeda-linked militants refused to surrender and opened fire.
A military official said three militants had been killed but a Reuters reporter in Miranshah, the main town in North Waziristan, said four bodies had been brought to a hospital there. He said the dead men appeared to be central Asian, perhaps Uzbeks.
The clash follows persistent US doubts expressed about Pakistan's commitment to the US-led war on terrorism.
Pakistan's tribal areas on the Afghan border are hotbeds of support for Islamist militants. Many foreign al Qaeda members took refuge there after US-led forces ousted the Taliban from power in Kabul in late 2001.
Beginning in 2003, Pakistani security forces launched offensives in North and South Waziristan as part of efforts in the US-led campaign against militants.
But the government later struck pacts aimed at reinvigorating traditional powers of leaders of the ethnic Pashtun tribes, which live on both sides of the border, and isolating the militants.
Critics say the deals have given militants free rein and let them expand their influence.
A senior US official said yesterday Pakistan had been increasingly active in repelling Taliban and al Qaeda forces on the Afghan border despite growing unease about Pakistan's commitment to the war on terrorism.
In February, US Vice President Dick Cheney visited Afghanistan and Pakistan and urged Pakistani President Pervez Musharraf to take tougher action against militants on his side of the lawless border where US commanders say radical fighters are training.
REUTERS DS BD1646