The gunfight erupted in Bomai village, after the security forces launched an operation to flush out militants hiding there, defence sources said.
Acting on intelligence inputs about presence of three to five militants in the village, the security forces cordoned off the area, they said.
As the jawans zeroed in on their target, the ultras hiding in the house fired at them and in the ensuing exchange of fire, three militants were killed.
The slain ultras were yet to identfied, the sources said, adding three AK 47 rifles were recovered from the scene.
The gunbattle was still raging in the village, the sources said.
Encounter on in Sopore; four policemen hurt
Machil fake encounter: 6 army men to be court martialed
Kashmir gives US cold wave a frosty fight
Hurriyat leader Geelani put under house arrest
Kashmir freezes at sub-zero temperatures, cold intensifies