The defence minister also conveyed his condolences to the families of those killed in the attack in Anantnag district of south Kashmir tonight.
"Terrorist attack on #AmarnathYatra is the most reprehensible act. My condolences to the bereaved families," he tweeted.
"This incident should add to our determination to eliminate terrorism," the defence minister said in another tweet.
Seven Amarnath pilgrims, five of them women, were killed in the militant attack that took place around 8.20 pm.
A bus carrying yatris was on the highway when the incident occurred. In the firing by militants, seven people were killed and as many injured, the official said.