Pakistani Army Chief of Staff Gen. Qamar Javed Bajwa met with Afghan President Ashraf Ghani in Kabul to discuss regional security and counter-terrorism co-operation.
Addressing the United Nations, President Ghani called on Pakistan to engage in earnest efforts to eliminate terrorism.
Afghan President Ashraf Ghani in his Eid ul Adha message offered to hold peace talks to end terrorism.
Only joint efforts can defeat terrorism in the region, said celebrants in Peshawar.
Officials and observers in the neighbouring countries are optimistic about warming relations.
Iran warned in May that it may hit militant targets inside Pakistan after leaders of the two countries agreed 'in principle' to co-operate on border security.
A delegation of Pakistani lawmakers visited Kabul with the goal of building trust with their Afghan colleagues.
Observers hope that the re-opening leads the way to better relations between the neighbours.
Both countries expressed willingness to work together to root out their common enemy following a spate of militant attacks.
The agreement is beneficial for both Afghanistan and Pakistan and may bring more peace deals to the table, analysts say.