The police said militants fired at a posse of CRPF who were on duty near the old bus stand in the town, 54 kms from Srinagar.
"The injured CRPF troopers were rushed to hospital where three jawans identified Ramesh Alovia, Pratap Singh and D R Singh of 179 batallion succumbed to their critical bullet wounds," a senior police officer said.
The firing triggered high tension and panic as people ran helter-skelter for security.
The area was surrounded by police and paramilitary CRPF for searches. The militants also snatched away two automatic rifles and fled.
No group has yet claimed responsibility for the attack.