The militants first lobbed a grenade towards the police station, which exploded at the entrance, said the police.
"A local Congress worker, identified as Mohammad Latief Mirchal, was wounded in the explosion. Attending doctors at the local hospital referred him to Srinagar for specialised treatment," a senior police officer said.
Minutes after the explosion, while the security forces were searching the surrounding area, militants opened indiscriminate fire at them from a nearby lane. Three guards, the driver of the area superintendent
"The injured cops and civilians were taken to the local sub-district hospital for treatment," the officer said. A policeman and a civilian succumbed to their injuries later.
Reinforcements have been rushed to the area where firing has now stopped, he said.
"The area around the police station building has been cordoned off for searches," he added.
Tension gripped Sopore town in the aftermath of the violence, where shopkeepers downed their shutters and pedestrians ran for cover.
No militant group has claimed responsibility for the attack so far.
Image: A policeman stands guard outside an ambulance carrying the victims of the attack on a police station in Sopore | Photograph: Fayaz Kabli/Reuters
Caste faux pas leaves Congress red faced
Security forces battle terorists in Sopore
Congress@125: Past tense, future perfect
Chelsea's Ashley Cole found guilty of speeding
JK: 4 CRPF men killed in militants' ambush