The gun battle lasted for 14 hours on Friday in the Special Operations Group's camp in Sopore town after the separatists entered it hurling grenades and firing bullets, Deputy Inspector-General Aijaz Ali said.
Paramilitary police guarding the town hall next door rushed to the scene, he said. Five of them died and seven others were wounded in the gunfight, he said.
Both of the attackers were killed, one of them after hiding inside the camp and firing intermittently at the security forces all day, Ali said.
The attackers, who were holding out inside the police camp's arms depot, were lobbing grenades and firing at soldiers in nearby buildings. Six policemen were wounded in the fighting.
Friday's strike was the biggest attack by separatists since a visit by Pakistan Prime Minister Shaukat Aziz in November to India.
Friday's attack was the biggest
by separatists since Aziz's visit
During the visit Aziz discussed the dispute over the region
with his Indian counterpart Manmohan Singh.
Sopore, a border town, is about 50km north of Srinagar, the summer capital of India's Jammu-Kashmir state.
An unidentified person claiming to be the spokesman for the Pakistan-based al-Mansoorian group claimed to have carried out the attack in a telephone call to a local news agency.
Al-Mansoorian is one of more than a dozen Islamist groups fighting security forces in Indian-administered Kashmir for the region's independence, or its merger with neighbouring Pakistan.