Army chief General Raheel Sharif made unplanned trip to Afghanistan along with Inter-Services Intelligence chief Lieutenant General Rizwan Akhtar and met Afghan President Ashraf Ghani and International Security Assistance Force (ISAF) Commander General John Campbell.
Army said that Kabul has promised to take action against militants.
"Afghan president assured General Raheel Sharif that Afghan soil will not be allowed for terrorists' activities against Pakistan and any signature found in this regard will be immediately eliminated," the army said in a statement.
It said that ISAF commander also pledged support to eliminate terrorist.
Military sources said that Pakistan shared specific intelligence about the involvement of militants hiding in Afghanistan's Kunar areas, including Taliban chief Mullah Fazlullah.
The Afghan side did not comment on the surprise visit by Pakistan army chief.

The attack on Army Public School on Warsak Road in Peshawar on Tuesday was the most gruesome militant assault in Pakistan's history, bringing international condemnation and outrage.
At least 148, mostly children, were killed in the attack claimed by Taliban.

Latest News from World News Desk