Though security has improved in Pakistan's remote areas bordering Afghanistan, sectarian militant attacks still occur.
"Pakistani troops are exercising maximum restraint so as to avoid any Afghan civilian casualties," the Pakistan Army's public relations department said, adding that five soldiers were wounded in the attack.
Afghan officials said that Pakistani troops crossed on to Afghan soil, prompting a response by border forces and the local tribal force.
"Two tribesmen were killed and the exchange of fire is ongoing," said Mohmud Zazai, a senior army commander in the area.
Pakistan has blamed Pakistani ‘Taliban’ militants it says are based on Afghan soil for attacks that have taken place in the region over the past two years, urging Kabul to eradicate "sanctuaries" for militants.
Afghanistan, in turn, accuses Islamabad of sheltering the leadership of the Afghan Taliban militants who are battling the Western-backed government in Kabul.
A local political official, who asked not to be identified, said that Pakistani security forces had responded on Sunday by opening fire along the border.