One Afghan soldier and a Pakistani army major have been killed after border forces exchanged gunfire at the main crossing point between the two countries.
Pakistan shut the border with Afghanistan for the second day in a row on Tuesday due to the continued clashes.
Twenty-two others were wounded in the fighting, ten of them were civilians, including children, Chief Administrator of Khyber Agency, Khalid Mehmood, told Al Jazeera.
Sunday's overnight clashes at the Torkham crossing began shortly after 9pm (16:00 GMT).
Al Jazeera's Kamal Hyder, reporting from Islamabad, said tensions have been brewing for a while over Pakistan's attempts to erect a gate on the border.
Afghanistan has long opposed this idea as it does not recognise the gate as a legitimate dividing line.
"The guns have fallen silent but the situation is extremely tense," said Hyder. "Everything is suspended. A curfew has been imposed and many families have been forced out of that area to seek refuge in other places."
The curfew has been declared at the Pakistani Landi Kotal town, which lies at the edge of the Khyber Pass, the main entrance to Afghanistan.
Both countries blamed each other for starting the fighting, which reportedly stopped at 5am (00:00 GMT) on Monday.
"The government of Pakistan expresses its deep concerns about the security of Pakistani soldiers near the border, in relation to the reports of unprovoked attacks that are unhelpful in Pakistan-Afghanistan relations," Pakistani Prime Minister Nawaz Sharif's office said in a statement.
The prime minister urged Afghanistan to investigate the incident.
"We currently have agreed on a ceasefire with Pakistan. We hope this problem will end through the work by diplomatic addresses," said the Afghan government's chief executive Abdullah Abdullah on Twitter.
"The current fight Pakistan started doesn't help anyone's interest."
Pakistan's moves towards fencing a 2km area at the Torkham crossing, was opposed and stopped by Afghanistan.
The row led to Pakistan's closure of the crossing last month, affecting thousands of people who commute across the border each day.
Pakistan says there is an infiltration of fighters from the Afghani side, and fencing of the border was the only immediate solution to keep a check on the people crossing.
Kabul has accused Pakistan of harbouring fighters seeking to topple the Afghan government, including the Haqqani network, blamed for high-profile attacks in the capital.
The Pakistan-Afghanistan border has long remained disputed. Afghanistan has blocked repeated attempts by Pakistan to build a fence on sections of the roughly 2,200km-long frontier, rejecting the contours of the boundary.
With additional reporting by Alia Chughtai: @