- The gun battle began Monday when Indian security personnel cornered militants
- Indian defense spokesman says the militants were hiding in caves
- The separatist violence has lasted for more than 20 years
The incident began Monday when Indian army troops and police surrounded a forest area in the Kupwara district, on the northern Kashmir border, after getting a tip that militants were in the area, an Indian defense spokesman said.
Militants hiding there opened fire, killing an army officer and two police officers, the spokesman said.
"The fire was returned, triggering a gunfight," the spokesman said.
The battle took place in a densely forested, mountainous area, the spokesman added.
"The terrorists were hiding in caves in the cliffs, which provided excellent cover for them."
The shooting ended Thursday with the deaths of five militants, a police spokesman said in a statement.
"The bodies of the killed militants have been retrieved and handed over to the locals for burial. Arms and ammunition were also recovered from the site," the police spokesman said.
An army soldier who was injured in the gunfight earlier also died, bringing the total death toll to nine.
Encounters between the militants and Indian security forces have been a regular feature of the over two-decade-long separatist violence that has so far claimed more than 42,000 lives, according to official counts. Various human rights groups and non-governmental organizations believe the actual figure is twice that.