The two 'fidayeens', who entered the Police Public School school ground in the outskirts of the city hiding automatic rifles and grenades in cricket kits, were eliminated after a 30-minute gunfight.
The attack is believed to have been carried out by Pakistan-based terror group Lashker-e-Taiba (LeT).
As many as 18 people including 15 CRPF jawans and three civilians were also injured in the attack, officials said.
Immediately after the attack that began at 10:45 am, Chief Minister Omar Abdullah rushed to Srinagar from Jammu where the Assembly session is underway and held a high-level meeting to discuss the law-and-order situation in the state.
Also Read
Security agencies believed that it was the handiwork of LeT as the state intelligence had warned of such an attack on police and paramilitary camps.
"Prima facie the terrorists don't appear to be locals but from across the border and first impressions are that they are possibly from Pakistan," Union Home Secretary R K Singh said in Delhi.
In the guise of playing cricket, the militants entered the school ground where some boys were playing but quickly removed their jackets and lobbed several grenades and fired indiscriminately from their AK-47s concealed in their kits to inflict the casualities before they were killed.
Luckily, the school was closed due to the strike called by separatists in support of their demand for return of mortal remains of Parliament attack convict Afzal Guru.
Two AK-47s, five magazines, two pistols with magazines, seven grenades, some Indian currency and Karachi-labelled medicines were recovered from the bodies of the militants, police claimed.
Today's incident is the first suicide attack in Kashmir in three years with the last such strike having taken place on January 6, 2010 at Hotel Punjab at Lal Chowk.