Militants in Indian-administered Kashmir have killed at least five security personnel in a gun and grenade attack near a school in Srinagar.
Two gunmen were also killed and at least five others, including three civilians, were injured, police said.
The gunmen, who concealed weapons in sports bags, launched the attack after mingling with children playing cricket.
It was the bloodiest militant attack for three years in the region, which is claimed by both India and Pakistan.
The Hizb-ul Mujahideen militant group said it had carried out the attack and threatened more violence, according to local media reports.
Indian-administered Kashmir has seen an insurgency against Indian rule since 1989, but violence has declined in recent years.
The gunmen attacked a security camp manned by the Central Reserve Police Force (CRPF) near a school run by the police in Bemina district of Srinagar.
The school was closed and no children were hurt in the attack, officials said. Security forces swiftly cordoned off the area.
A senior police official said the attackers had "mixed" with children playing cricket on a nearby field and were carrying weapons in sports bags.
"They threw a grenade at the security forces, killing five of them. They also opened fire," the official said.
Two of the attackers were killed after the police returned fire and a searched was launched for any other militants, although none were found.
Later, a man died after police opened fire on protesters who they said had thrown stones at vehicles taking the injured to hospital. Local residents denied the man had been protesting or throwing stones.
Indian-administered Kashmir has been tense since the execution in February of Afzal Guru, a Kashmiri man convicted for plotting to attack India's parliament in 2001.
Militants attacks in Srinagar have become rare - last October one person was killed by gunmen who opened fire in a hotel on the outskirts of the summer capital.
And in May last year seven paramilitary soldiers were injured after two men on a motorcycle fired at them in the city.
The last major militant attack was in January 2010 when two militants launched a grenade and gun attack in the city's Lal Chowk area and later took refuge in a hotel.
Security forces stormed the hotel, killing the gunmen and ending the stand-off that lasted almost 24 hours. A policeman and a bystander were also killed.