Five soldiers were injured in the gun battle.
Nuclear-armed rivals India and Pakistan each administer part of Kashmir, but both claim the Himalayan territory in its entirety. Both claim the territory in full.
The three slain militants were locals belonging to Hizbul Mujahideen outfit.
Resonating similar views, another defence Expert P.K. Sehgal stated that losing our soldiers is the most heartening issue.
As news of their death spread, hundreds of residents from neighbouring villages took to the streets in protest, throwing stones at soldiers and chanting slogans against Indian rule.
"People tried to march towards the site of the gunfight yesterday but there was a strong cordon", said 29-year-old Irshad Ahmed.
Reportedly, seven civilians had sustained pellet injuries during the clashes.
"Injured police personnel have been referred to hospital", the spokesman said. "We lost two officers and three army personnel were injured".
Anti-India sentiment runs deep in Kashmir's mostly Muslim population and most people support the rebels' cause against Indian rule.almost 70,000 people have been killed in the uprising and the ensuing Indian military crackdown.
The militants fired at the Army building in Kalaroos area during the night, a police official said.
Three terrorists were killed on Sunday in an encounter in Jammu and Kashmir's Shopian.