Two mortar shells were fired into Pakistan from the Afghanistan territory, said Foreign Office spokesperson Aisha Farooqui on Wednesday. No casualties were reported.
Following the incident, the Torkham border gate was closed off for security reasons, she added.
"The matter is being coordinated with Afghan authorities," Farooqui said in a statement, adding that the gate is likely to be opened soon.
"Some mortars were fired from across the border in Afghanistan and landed inside Pakistan. They caused some damage to vehicles," Mahmood Aslam Wazir, deputy district commissioner of the area on the Pakistani side, told Reuters.
An Afghan official denied that Afghan forces had fired into Pakistan.
"In the past, Pakistan has played the same game whenever they want to close the Torkham crossing," Attaullah Khogyani, spokesman for the governor of Nangarhar province, told Reuters.
Prime Minister Imran Khan had last year decided to keep the Torkham border crossing open for 24 hours in order to facilitate trade between Afghanistan and Pakistan.
Despite measures to improve ties, however, there have been several incidents of border skirmishes between the Afghanistan and Pakistan forces.
In October last year, 11 people were injured in a border skirmish between the Pakistan and Afghanistan forces after the latter fired mortars and heavy machine guns in Narai district of Kunar province, targeting civilian population in the Arandu village.
According to Abdul Ghani Musamem, a government official in Afghanistan’s Kunar province, the clashes had erupted when Afghan troops used force to stop the construction of a border installation.
Pakistan Army is currently fencing the border and building forts for paramilitary forces along the porous Pak-Afghan border to check illegal cross-border movement of people.