The encounter broke out in Laribal village of Zachaldara in Handwara, 100 kilometre from Srinagar, on Thursday night after security forces launched an operation, an army officer said.
In the ensuing gunbattle, two unidentified militants and two soldiers were killed so far, he said.
The operation is still in progress as there were inputs about the presence of other militants in the area, the officer added.
The encounter comes in the midst of the border security forces talks between India and Pakistan in New Delhi. At the talks, which gave out positive vibes, the two sides decided to stop firing and ceasefire violations and reduce human casualties.
In September so far, Pakistan has violated the ceasefire 11 times.
Meat ban fever spreads across 3 states
The rise and rise of Rakesh Maria
Border guards of India, Pak agree to end ceasefire violations
He killed 10 terrorists in 11 days before he fell to bullets
Photo of cop carrying BJP MLA on back goes viral