Police said security forces surrounded Hayatpora village in Chadoora tehsil of Budgam following specific information about presence of militants there.
"Two militants hiding inside a house in the village were killed in the gunfight and an AK-47 assault rifle and a pistol recovered from the spot," a police officer said.
No security personnel or civilian was injured in the operation, said the officer, adding that the operation was carried out with caution to ensure that there is no collateral damage.
Encounter has now ended. Two AK-47 rifles and a pistol has been recovered from two terrorists, said reports.