Afghan officials said that Pakistani troops crossed on to Afghan soil, prompting a response by border forces and the local tribal force.
Afghanistan authorities have opposed the plans of fencing the Afghan frontier by Pakistan as the latter dispute the demarcation made during the British era.
Governor of Afghanistan's eastern Khost province Hukam Khan Habibi was quoted as saying that two persons were also killed in the border district of Zazai Maidan. "Mil [military] engagement is underway to defuse situation", the ISPR said in a statement.
Initially, Afghan National Police interim chief Col. Abdul Hanan told Anadolu Agency an Afghan civilian was killed and two Pakistani troops were arrested during the clash. He added that local villagers and the Afghan Border Police retaliated with gunfire.
Pakistan and Afghanistan share a almost 2,600-kilometer largely porous border.
Clashes are still underway, he said.
According to Azadi Radio, Pakistani forces are shelling Afghan border posts in Zazi Maiden.
In earlier reports, the security forces confirmed injuries to three personnel but later the ISPR informed that two personnel were martyred and three injured.
Afghan officials often give conflicting casualty figures.
The Inter-Services Public Relations (ISPR), the military's media wing, in a statement said that the Frontier Corps personnel deployed in Kurram Agency were attacked from Afghanistan.
Kabul has long-accused Islamabad of providing safe havens for the Afghan Taliban, which has been waging an insurgency in Afghanistan for more than 16 years. Pakistan and Afghanistan share almost 2,600-kilometer, mostly porous, border and both sides routinely accuse each other of initiating cross-border skirmishes.