Seven of the dead were police officers and two were armed men from a separatist group.
Another 12 people were wounded, eight of them police officers, in the stand-off which began on Wednesday when a group of separatists threw a grenade at a security camp and then entered a hotel opposite and began firing at the base.
"The operation is over now [but] we are still searching the area for abandoned ammunition and explosives," Gopal Sharma, director-general of police for Jammu and Kashmir state, told reporters.
The separatist group al-Mansurian said that a three-member suicide squad attacked the camp, which is close to a residential area of Srinagar, the summer capital of the state of Jammu and Kashmir.
The group said it had killed 11 policemen and that one of their members had escaped.
"One of our mujahid [freedom fighters] has returned to base and two were martyred in the attack. Our mujahideen killed at least 11 policemen," a caller, identifying himself as an Al-Mansurian spokesman, told newspaper offices in Srinagar.
The attack is the most serious in recent months in Srinagar, where there have been street protests almost every day for a week since a court in Delhi fixed October 20 as the date for hanging a Kashmiri man, Mohammed Afzal, for an attack on India's parliament in 2001.
"One of our mujahid has returned to base and two were martyred in the attack. Our mujahideen killed at least 11 policemen"
A spokesman for al-Mansurian
The man's wife has since appealed to the president for clemency.
The Himalayan region has been rocked by a separatist insurgency since 1989 in which more than 45,000 people have been killed, but violence has eased since India and Pakistan started peace talks in 2004.
Kashmir is split between the nuclear-armed rivals but is claimed in full by both. Last month, leaders of the two nations decided to set up a joint agency to fight terrorism.