A soldier was injured after terrorists opened fire from across the Pakistan-Afghanistan border in the Bajaur district of Khyber Pakhtunkhwa late on Friday night, the military's media affairs wing said in a statement.
The Inter-Services Public Relations (ISPR) said that terrorists from the Afghan side of the international border opened fire on a military checkpost in Pakistan.
Pakistani troops responded promptly to the attack, the ISPR said, adding that a soldier was injured in the exchange of fire.
In its statement, the ISPR said Pakistan has "consistently been requesting Afghanistan to ensure effective border management".
"Pakistan strongly condemns the use of Afghan soil by terrorists for activities against Pakistan," it added.
This is the second such incident to take place this week. On Wednesday, four Frontier Corps (FC) soldiers were martyred while six others were injured after terrorists ambushed them during a fencing activity along the Pak-Afghan border in the Manzakai sector in Balochistan's Zhob.
After that attack, the Afghanistan embassy had been asked to convey Pakistan's concerns to the relevant authorities in the country to "undertake effective measures against organised groups of terrorists operating from Afghan soil, follow mutually agreed protocols and SOPs and avoid recurrence of such incidents in future", according to the Foreign Office.
In October of last year, a soldier was martyred and another wounded when terrorists fired gunshots from across the Pak-Afghan border on the Pakistan Army post in Bajaur. Another such attack had taken place a month earlier in which a soldier was martyred as well.
As the United States begins withdrawing its troops from Afghanistan, there are fears that violence will increase and could also spill over to neighbouring states, including Pakistan. Violence against Afghans has escalated starkly in recent weeks, with more than a hundred Afghan security force personnel killed.
Read: US pullout from Afghanistan a test for Pakistan, other neighbours
Earlier this month, Pakistan along with the US, China and Russia urged the Afghan government and the Taliban to ensure that Afghan soil is not used to threaten the security of any other country.
"We call on all Afghans including the government of the Islamic Republic and the Taliban to ensure that terrorist groups and individuals do not use Afghan soil to threaten the security of any other country," they said in a joint statement issued in Washington.