Pakistan said Friday Afghanistan-based "terrorists" conducted "multiple physical and fire raids" on security outposts, killing three soldiers.
The attack occurred in North Waziristan border district and triggered an intense gunfight between assailants and Pakistani security forces. The shootout killed five terrorists and "valiantly" repulsed all attempts to overrun the posts, an army statement noted.
Pakistan has been building a robust fence along the nearly 2,600-kilometer largely porous frontier with Afghanistan to deter illegal crossings and terrorist infiltration in either direction.
Military officials say teams involved in the fencing project have come under repeated attacks from the Afghan side over the past year, leaving seven soldiers dead and many more wounded.
Islamabad maintains that fugitives linked to the outlawed Tehrik-e-Taliban Pakistan, or TTP, use bases in "ungoverned" Afghan boarder areas to plot cross-border violence.
A majority of former TTP members have joined the ranks of Islamic State in Afghanistan, according to U.S.military officials.
Friday's cross-border terrorist raid took place a day after U.S. officials disclosed that a June 13 drone strike targeted TTP's chief, Mullah Fazlullah and eliminated him for ordering deadly attacks against Pakistani and U.S. interests.
Islamabad has long demanded that Afghan authorities and the U.S. military stop the anti-Pakistan militants from conducting cross-border terrorism.
Washington announced a $5-million reward in March for help in bringing Fazlullah to justice.
TTP's spokespeople have not yet confirmed or denied the reported killing of Fazlullah and four of his commanders in the drone attack that hit them in a remote border district in the eastern Afghan province of Kunar.