The Torkham border crossing, at the top of the Khyber Pass, through which thousands of vehicles pass every week, is the main trade link between the uneasy neighbors.
In September last year, Pakistan opened the crossing for 24 hours a day to boost trade.
“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.
Pakistan and Afghanistan are both U.S. allies but their relations have rarely been close.
Afghanistan has for years accused Pakistan of supporting Taliban militants. Pakistan denies doing so and in turn accuses Afghanistan of supporting militants fighting the Pakistani government.
Exchanges of fire across a border Afghanistan has never recognized are common.
An Afghan official denied that Afghan forces had fired into Pakistan.
Attaullah Khogyani, spokesman for the governor of Nangarhar province, on the Afghan side of the border, suggested that Pakistani forces had fired the mortar bombs as a ruse.
“In the past, Pakistan has played the same game whenever they want to close the Torkham crossing,” Khogyani told Reuters.
Pakistan was angered this week when Afghan President Ashraf Ghani condemned the arrest in Pakistan of a Pakistani ethnic Pashtun rights activist.
Pashtuns live on both sides of the border.
Pashtuns in Pakistan have been protesting recently against their government in a campaign for greater rights that many Pashtuns in Afghanistan support.
It was not clear how long the border would remain closed.