Another three soldiers have been killed in a stand-off with militants near Srinagar in Indian-administered Kashmir, military officials say.
Two other soldiers and a civilian were killed in violence on Saturday.
The stand-off began when up to four attackers ambushed a military convoy before taking refuge in a training institute.
A new exchange of gunfire began on Sunday morning as soldiers repeatedly tried to dislodge them.
Part of the building was on fire as security forces came under prolonged gunfire.
Two army captains are among those killed on Sunday, military officials say.
About 100 students and staff were evacuated from the building on Saturday as it was encircled by troops.
The security forces say they are preparing for a final assault on the institute and are reported to be using reconnaissance drones in preparation.
Police have described the militants as “suspected anti-India rebels”.
The gunmen took refuge in the government-run Entrepreneurship Development Institute after attacking paramilitary forces in a convoy on the main road linking Srinagar to Jammu.
Intermittent exchanges of fire near the building could still be heard until late on Sunday afternoon.
Eyewitnesses say as many as five gunmen could be holed up.
Witnesses say the gunmen told civilians in the complex to “save themselves” and move to a nearby hostel on the campus as they broke into the premises.
Kashmir, claimed by both India and Pakistan in its entirety, has been a flashpoint for more than 60 years.
The two South Asian rivals have fought two wars over the region in the Himalayas.