The Pakistan army said that at least 45 militants were killed in a raid on a camp in North Waziristan near the Afghan border.
Hundreds of Pakistani troops patrol the border with Afghanistan
A statement from the military said that the dead militants were "mostly foreigners".
Spokesman Maj Gen Shaukat Sultan said one soldier died and 10 others were injured in the attack.
The attack comes shortly before US President George W Bush is due to visit Pakistan as part of a regional tour.
Mr Bush told a news conference in Kabul on Wednesday that he would raise the issue of militants infiltrating into Pakistan when he meets President Pervez Musharraf later this week.
Last month, Pakistan protested after a US missile strike in the Afghan border region killed at least 18 people.
The authorities in North Waziristan announced a temporary truce last week to allow tribes people to clear the area of foreign militants.
The army says troops backed by three helicopter gunships took part in Wednesday's attack on the basis of "confirmed intelligence" that militants were in the area.
Sayed Zaheerul Islam, a senior local government official, said the attack took place at Saidgai, about 15km (10 miles) north of Miran Shah, the region's main town.
"It was a training camp of foreign miscreants," he said. An ammunition dump in the camp was also hit and loud explosions could be heard, he said.
Maj Gen Shaukat Sultan said most of the militants killed in the raid were foreigners from Central Asian or Arab countries. The group's leader was a Chechen militant with the codename Imam, he said.
A special task force had cordoned off the scene of the raid and was carrying out a search.
The BBC's Barbara Plett says helicopter gunships pounded a compound of about eight houses before ground troops moved in.
Eyewitnesses said civilians were among the injured
One eyewitness, Shabbir Khan, told the BBC's Haroon Rashid that a woman died when the vehicle she was travelling in came under fire. He said he was not sure who fired on the vehicle.
Nek Amal Khan, a tribal elder, told Reuters that a helicopter fired on the van in which he and his two companions were travelling. He said they saw more helicopters fire on the house of a local cleric.
Local tribesmen reacted angrily to news of the raid. Reuters news agency reported that hundreds of tribesmen from Miran Shah town were seen heading towards Saidgai carrying automatic weapons and rockets .
Recently Afghanistan handed Islamabad a list of wanted criminals whom they say are hiding in Pakistan. Afghanistan has criticised Pakistan, saying it is not doing enough to tackle militancy.
In a BBC interview broadcast on Wednesday, Pakistani President Pervez Musharraf reacted strongly to the criticism.
Afghanistan should get its "own house in order" he said, and argued that more militants were operating out of Afghanistan than from Pakistan.
Although he admitted that there was some infiltration, he emphasised that the army was taking all possible measures to stem it.
Islamabad has sent hundreds of troops to the border area in recent years to combat fighters believed to have fled from Afghanistan after the Taleban regime was overthrown in 2001.