Two Pakistani paramilitary troopers and six militants were killed in an attack that officials said was launched from across the border with Afghanistan.

Personnel of Pakistan’s Frontier Constabulary paramilitary force offer funeral prayers for a colleague who was killed in a militant attack on March 17, 2017. Two Pakistani personnel were killed in the cross-border attack from Afghanistan, the military said. The attack in Khyber Agency was claimed by Jamaat-ul-Ahrar, a faction of the Pakistani Taliban. (AFP)

Two Pakistani paramilitary personnel and six militants were killed when insurgents carried out a cross-border attack from Afghanistan on a security post in the Khyber tribal region on Friday.

The militants were killed in the exchange of fire that erupted after the attack early on Friday, officials of the Frontier Constabulary said.

“Terrorists from across the border attempted a physical attack on Frontier Constabulary post in Khyber Agency. Pakistani troops effectively responded. Six terrorists (were) killed. In exchange of fire, two Frontier Constabulary soldiers also killed,” the military’s media wing said in a brief statement.

According to security officials, the Speena Sooka post in Khyber Agency, which is manned by the paramilitary personnel, was attacked from the Afghan side.

Jamaat-ul-Ahrar, a faction of the outlawed Tehrik-e-Taliban Pakistan, claimed responsibility for the attack. It claimed 110 of its fighters took part in the attack.

In a separate incident, a soldier and two suicide bombers were killed when security forces foiled an attack on security forces’ training centre at Charsadda district in Khyber-Pakhtunkhwa province. Another soldier was injured.

Friday’s skirmish on the Durand Line was the latest in a series of cross-border attacks on Pakistani troops. Earlier this month, five Pakistani soldiers were killed in cross-border attacks on several security posts.

Torkham, the main trade route with Afghanistan, has been closed for all traffic since a suicide attack on a Sufi shrine in southern Sindh province that Pakistani officials believe was planned on Afghan soil.