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.
Several projects are under way to encourage development and achieve regional peace, officials and analysts say