At least eight civilians were killed on both sides in fighting that began when a Pakistani census team accompanied by soldiers visited disputed villages along the southern border on Friday.
Afghanistan's envoy to Pakistan Omar Zakhilwal on Monday rubbished claims that Pakistani security forces killed 50 Afghan soldiers in retaliation to allegedly unprovoked firing in Balochistan's Chaman area, saying that only two Afghan soldiers were killed and seven others injured.
They say the Afghan government had been notified and given the coordinates of the border villages, where the census workers were going door to door.
Afghan police spokesman Zia Durani accused Islamabad of using the census as cover for "malicious activities and to provoke villagers against the government". It said that in the first two months of 2017, 807 personnel of Afghan security forces had been killed and 1,328 injured.
It was the second time this year that the Chaman border crossing was sealed.
Pakistan and Afghanistan routinely accuse each other of providing sanctuaries to their enemy insurgents which both sides deny.
"We are not pleased to announce this but the Afghan commanders are responsible for this", he said while briefing the media on the Chaman border firing issue.More news: Wizards' Oubre suspended for Game 4 for knocking over Olynyk
During a BBC interview, the President's deputy spokesperson Dawa Khan Mina Pal said Ghani was invited by Director General Inter-Services Intelligence (ISI) Lt Gen Naveed Mukhtar and parliamentarians to visit the country.
He said the Afghan government and the warring factions including the Taliban need to reach a peace agreement to achieve that objective.
Separately, an Afghan truck driver died after a rocket fired from across the border on Friday hit him in Nangarhar province, said Attaullah Khogyani, a spokesman for the provincial governor.
He said that the Pakistani Forces retaliated and targeted those afghan posts from where fire was opened. Earlier, in February Pakistan closed off all border crossings with Pakistan after more than 100 were killed in a wave of attacks.
Later Friday, the Pakistani military said a hotline had been established between the two sides and that the cross-border shooting had stopped.
Meanwhile, Afghan border soldiers also warned that they will stand against any move by Pakistan's military.
In response to the attack, Pakistan had closed its borders with Afghanistan at Chaman and Torkham on February 18 after a series of terrorist attacks in the country killed over 100 people.