Militants killed at least three Pakistani soldiers in an attack on early Saturday on a border post in the restive northwestern tribal belt while air strikes against rebels left 13 insurgents dead, officials said.
Around two dozen militants armed with sophisticated weapons crossed from the Afghan province of Kunar to launch the pre-dawn ambush in Bajaur district, Pakistani officials said.
"Militants from across the border ambushed a check post. Two security personnel and an officer embraced martyrdom in the attack," a security official in Bajaur told AFP by telephone.
A senior government official said the militants were forced to flee after troops retaliated.
No group has yet claimed responsibility but both officials said Tehreek-e-Taliban Pakistan (TTP) militants were involved in the attack.
"It might be in retaliation for the Pakistan military offensive in North Waziristan," the government official told AFP.
A senior military official in Peshawar, the region's main city, confirmed the attack and death toll and told AFP that the troops were killed when a rocket hit a vehicle near the check post.
"Two soldiers were wounded and taken to the main hospital in Bajaur," he said.
Hardline cleric Maulana Fazlullah, current head of the TTP which rose up against the Pakistani state in 2007, is believed to be possibly hiding across the border in Kunar.
Pakistan's armed forces have been waging a massive offensive in North Waziristan, a tribal district south of Bajaur, for the past three-and-a-half weeks to eradicate hideouts militants have used to launch attacks across the restive nuclear-armed country.
A military statement on Saturday said fighter jets bombed insurgent hideouts in the town of Mir Ali after militants fired rockets at a security checkpost, "killing at least 13 militants and destroying seven hideouts".
"A huge cache of arms and ammunition was also destroyed. Most of the terrorists killed in strikes are foreigners," it added.
It said two explosives-laden vehicles were destroyed by air strikes while two suicide bombers blew themselves up when encircled.
More than 400 militants and 20 soldiers have been killed in the offensive so far, according to the military. The area is off-limits to journalists and the number and identity of the dead is impossible to verify.
The rugged mountainous area has for years been a hideout for Islamist militants of all stripes -- including Al-Qaeda and the homegrown TTP as well as foreign fighters including Uzbeks and Uighurs.