Militants ambushed a convoy of Pakistani troops on Thursday, killing seven and wounding 22 in the deadliest attack for months in Pakistan's northern Waziristan region, officials said.
Helicopter gunships and soldiers hunted the rebels after the attack, killing up to six.
Separately, a suspected foreign insurgent and a paramilitary soldier died in a gunbattle at a checkpoint in the tribal region of Bajaur near Afghanistan's southeastern border, they said.
Pakistan, a key US ally, has been trying to flush out al-Qaeda and Taliban insurgents and their supporters and restore control in Waziristan.
The seven soldiers killed in the ambush were securing the route when they came under fire in the village of Sarobi, which is 20km north of Miranshah - the main town in North Waziristan - said Major General Shaukat Sultan, the chief military spokesman.
"There are seven martyred and 22 injured"
Pakistani army spokesman
"This happened when security forces were moving and mounting routine security positions. The attackers used nearby heights and attacked the security forces," Sultan said.
"There are seven martyred and 22 injured."
Sultan said troops were responding to the attack and had secured the area. He did not confirm the militant death toll.
An AFP correspondent on the ground said firing had stopped but soldiers were barring all vehicles from the area.
The second attack erupted when a suspected foreign militant refused to get out of a car at a checkpoint near Khar, the main town in Bajaur.
"He started firing at the paramilitary forces. One was killed and the suspect was also killed," he said.
Separately, five paramilitary soldiers were wounded late on Wednesday when a remote-controlled roadside bomb struck their vehicle in the village of Spinwah, 40km northeast of Miranshah, a security official said.
Rockets were fired at security forces in the nearby border town of Mirali early on Thursday but caused no casualties.
Pakistan says it has deployed 80,000 troops in Waziristan to hunt militants who sneaked across the border with Afghanistan after its Taliban government was toppled by US-led forces in late 2001.
Pakistani troops often clash
with militants in Waziristan
North and South Waziristan have seen major clashes over the past two and a half years. Fierce battles flared again last month, leaving about 250 insurgents and five soldiers dead, the military said.
Last week, Pakistani security officials said a top al-Qaeda operative indicted for the 1998 US embassy bombings in Africa was believed to have died in a Pakistani military strike in North Waziristan.
Egyptian-born explosives expert Abdul Rahman Al-Muhajir - who carries a $5 million US bounty on his head and is also known as Muhsin Musa Matwalli Atwah - is thought to have been killed along with seven other militants.
In January, a US airstrike in Bajaur, apparently targetting al-Qaeda's number two, Ayman al-Zawahiri, killed 18 civilians and three suspected militants from Osama bin Laden's extremist network.
Pakistani followers of Afghanistan's Taliban have taken virtual control of some parts of the tribal areas, setting up parallel justice and administrative systems based on Islam's Sharia law, military and security sources say.
Suspected militants have this week beheaded or shot dead four people allegedly working as American agents. They left a note near one body warning that "all those working as US spies will face the same fate", officials said.