The gunfight broke out in village Malikpora in Vilgam area, 85-km from here, when army and police launched a joint search operation following information about the presence of ultras there, a senior police officer said.
The hiding militants opened fire at security forces who retaliated, triggering a fierce gunbattle which lasted several hours.
Two militants, belonging to Pakistan-based LeT outfit, were killed and an army officer, Major Sandeep Kotwal, was wounded in the gunbattle, the officer said.