The gunbattle broke out at Wadderbala forest in Zachaldara, 90 kms from Srinagar, around 11 am on Friday when a joint search party of police and Rashtriya Rifles confronted hiding militants.
The hiding militants fired upon the search party and in the ensuing gunbattle which lasted nearly 24 hours, two militants and a soldier were killed.
While one militant was killed on Friday, another ultra and the army jawan were killed early on Saturday.
Two assault rifles, two magazines and some rounds of ammunition were recovered from the possession of the slain militants, believed to be foreign nationals.
The search party also recovered a hand grenade which was destroyed on the spot.