At least two Pakistani security personnel were killed in cross-border fire from Afghanistan Friday, the military said, when gunmen attacked a checkpoint near the frontier in the troubled northwest.
The attack in Khyber tribal district was claimed by Jamaat-ul-Ahrar (JuA), a faction of the umbrella Pakistani Taliban, and came at a time of heightened tensions between Pakistan and Afghanistan.
"Terrorists from across the Pak-Bdr attempted physical attack on Pak FC (Frontier Constabulary) Post in Khyber Agency," said a military statement, adding that six militants were also killed in the exchange of fire.
Islamabad blames Kabul for hosting JuA and other militants responsible for carrying out a wave of attacks in February that killed 130 people across the country and prompted fears of a militant resurgence.
Afghanistan also routinely accuses Pakistan of providing safe haven to the Afghan Taliban.
Earlier Friday, Pakistani troops also fought two suicide bombers trying to enter an FC training centre in northwestern Khyber Pakhtunkhwa province.
Suhail Khalid, police chief in Charsadda district, told AFP that the suicide bombers first opened fire at the main gate and then tried to enter the training camp.
"One bomber blew himself up, while second was shot dead," Khalid said. One FC soldier was killed and a second injured, according to a military statement.
Charsadda was among the places targeted in last month's attacks, with three people killed and 19 injured when multiple suicide bombers attempted to enter a court complex on February 21.
Pakistani security forces have been on high alert since February's attacks, which also included a suicide blast at a Sufi shrine that killed 90 people and was claimed by the Islamic State group.
The attacks, most of which were claimed by the Islamic State group or the Pakistani Taliban, dented optimism after the country appeared to be making strong gains in its decade-and-a-half long war on militancy.
The military announced the launch of a nationwide anti-terrorist operation, and Islamabad has closed the two main gates along its porous border with Afghanistan, Torkham at the Khyber Pass and Chaman in Balochistan province.