Two people injured in the firing, Tanveer Ahmed Pala and Mohammed Ibrahim Wani, were rushed to hospital. Tanveer, 18, did not survive.
According to the police, the soldiers were on foot patrol duties in the district's Beerwah area and were on their way back to the army camp. A short distance from the camp, some miscreants started throwing stones at them.
"Suddenly someone threw a firecracker on security forces," said Munir Khan, Inspector General of Police. When it burst with a loud noise, the soldiers mistook it for a grenade and fired in the direction from where the firecracker had been thrown.
After the incident, thousands marched with the body of Pala in Beerwah town, shouting slogans against the security forces.
Kashmiri separatists had earlier called for a shutdown and asked people to march to the local office of the United Nations. Most of the shops, fuel stations and other business establishments were shut while public transport was off the roads, the officials said.
The police said roads leading to the office of the United Nations Military Observer Group in India and Pakistan (UNMOGIP) at Sonwar had been sealed and security forces deployed in full strength at sensitive places to avoid any untoward incident.