The attack took place in Pinglana area of the south Kashmir district.
The gun battle had ensued when alert army jawans had foiled an infiltration bid by the terrorists.
As firing from across the border declined following strong retaliatory response by India, Prime Minister Narendra Modi on Friday said Pakistan has been taught a "befitting lesson" with the army "shutting their mouth".