Militants, armed with grenades and automatic rifles, killed 17 Indian soldiers on an army base in India-administered Kashmir near the de facto border with Pakistan on Sunday, the most deadly attack in the northern region of Kashmir since 2014.
An Indian army spokesman said four "fidayeen" - or commando-style gunmen were killed in the gunbattle after penetrating the base in Uri near the Line of Control with Pakistan. Uri is about 100km west of the troubled northern region's main city of Srinagar.
"Four terrorists killed in counter-terrorist operation at Uri. 17 soldiers make the supreme sacrifice," the command posted on Twitter.
The Indian army said in a statement that the encounter resulted in "heavy casualties".
"We salute the sacrifice of 17 soldiers who were martyred in the operation," the statement said.
The statement added that the soldiers are now searching the base, 100 kilometres (62 miles) west of the region's main city of Srinagar, for any more militants.
The army deployed helicopters to airlift 20 soldiers who had been injured in the pre-dawn attack followed by an hours-long gunfight.
However, no group has claimed responsibility for the attack.
Indian Prime Minister Narendra Modi vowed to punish those who are responsible for the "despicable" and "cowardly" attack.
"We strongly condemn the cowardly terror attack in Uri. I assure the nation that those behind this despicable attack will not go unpunished," Modi said in a tweet after the raid.
The incident comes amidst heightened tension in India's only Muslim-majority region following the July 8 killing of a popular separatist field commander.
At least 87 civilians were killed and thousands were injured in street clashes with Indian security forces, following the killing of a popular rebel leader in a gunbattle with soldiers on July 8.
Home Minister Rajnath Singh, who cancelled his scheduled trips to Russia and the United States, tweeted that he had spoken to the region's political and military leadership. He instructed the senior officials to monitor the situation.
"We have activated the entire force in and around Uri sector to step up security and launch combing operations," a senior Home Ministry official told Reuters.
"It is clearly a case of cross-border terror attack. We don't know which militant group is involved," the official added.
India accuses Pakistan of supporting a number of militant attacks in the northernmost state of Jammu and Kashmir, which they both claim in full but rule only in parts.
However, Pakistan has always denied its role in cross-border terrorism. It has asked the United Nations and the international community to investigate the matter.