In a statement issued in Islamabad, Pakistan's foreign office extended heartfelt condolences to the government and people of India and the bereaved families. It also wished the injured people speedy recovery, Radio Pakistan reported.
Building on the goodwill created during the recent high level contacts between the two countries, Pakistan remains committed to partner with India to completely eradicate the menace of terrorism afflicting South Asian region, the statement said.
At least four terrorists were killed by commandos following the attack, police said.
In New Delhi, Home Minister Rajnath Singh said: "Any terrorist attack on us from Pakistan, and we will give it a befitting reply."
Terrorists from Pakistan had launched a terror attack on Dinanagar town in Punjab's Gurdaspur district on July 27, 2015, leaving seven people dead, including a senior police official.