The stakes are high. The United States wants Pakistan to help Afghanistan to coax the Taliban to the negotiating table ahead of the withdrawal of most NATO combat troops by the end of 2014.
But relations between the South Asian neighbours have been marked by decades of distrust and outbreaks of fighting.
Last September, Afghanistan sent extra troops and artillery to the border with Pakistan as tensions rose over a spate of cross-border shelling that allegedly killed dozens of Afghan civilians.
Afghan President Hamid Karzai said he hoped the clash would not escalate.
"That being said, the Afghan government will do its utmost to protect the Durand Line, and to make sure that no foreign military installations or checkpoints ... hold at the Afghan side of the Durand Line," he told reporters in Copenhagen on Thursday during a visit to Denmark.
The Pakistani Foreign Ministry released a statement saying it had summoned the senior Afghan diplomat in Islamabad to protest at what it called "an unprovoked firing incident".
A Pakistani military source said the shooting had been sparked by an attack on a Pakistani checkpoint. The senior Afghan official claimed trouble had started after Pakistani troops attempted to fortify the border gate.
Two Afghan border policemen were allegedly wounded.
Frustration over peace process
The Afghan government has grown increasingly frustrated with Pakistan, suggesting it is intent on keeping Afghanistan unstable rather than helping to engage the Taliban in peace talks.
Afghan officials say Pakistan has a long history of supporting Afghanistan's Taliban and other insurgent factions. Pakistan has in turn accused Afghanistan of giving safe haven to Pakistani militants on the Afghan side of the border.
The latest tensions are focused on Pakistan's building of a military gate, which Afghan officials say lies inside Afghanistan.
Karzai has ordered his top officials to take immediate action to remove the gate and other Pakistani military installations near the Durand Line, the 1893 British-mandated border. It is recognized by Pakistan, but not by Afghanistan.
Afghanistan maintains that activity by either side along the Durand Line must be approved by both countries.
Also on Thursday, seven Afghan local police were killed when a roadside bomb hit their vehicle in the troubled eastern province of Logar.
In Copenhagen, Karzai said he had applied to have Afghan prisoners being held in US custody at Guantanamo Bay removed from a UN sanctions list, and wanted them sent back to Afghanistan.
In 1999 the United Nations voted to place sanctions on al Qaeda and the Afghan Taliban at a time when they were cooperating closely. More than 120 people associated with the Taliban remain subject to asset freezes and travel bans due to alleged terrorist activity, among them some who are being held without trial at the US Naval base in Cuba.
Comments are moderated and generally will be posted if they are on-topic and not abusive.
For more information, please see our Comments FAQ