The two militants were holed up in a house in Pazalpora village in Sopore township, police said.
Two additional battalions - 2,000 men - of the Army will be sent as reinforcement to four troubled districts of Jammu and Kashmir, officials said.
Following intelligence inputs about the presence of militants, forces had launched a cordon and search operation on Tuesday night.
"As the house-to-house search was launched by the security forces, contact was established with militants at around 9 pm and an exchange of fire took place", sources said and added an army major was hit by a bullet during the initial firing.
Two militants were killed in the encounter that broke out in the morning.
The troops killed the youth identified as Gulzar Ahmed and Basit Ahmed during a siege and search operation at Pazalpora in Rafiabad area of the district. It was around 3 a.m. that firing resumed, he said.
Singh said both the slain militants were involved in a number of subversive/ militancy related cases.
He said that two AK rifles, five AK magazines, 124 AK rounds, a hand grenade and a pouch have been recovered by the security forces from the encounter site. However, the grenade exploded without causing any damage, he said.This was the second attack on the camp during the past less than a week. Lone is also accused of attacking mobile towers and is considered instrumental in instigating and luring Kashmiri youth to join HM.