The security forces launched a cordon-and-search operation in Natipora area of Sopore in Baramulla district at around 3.30 am after receiving information about the presence of militants there, a police official said.
During the searches, the two militants opened fire on the forces, triggering a gun-battle, he said.
Director General of Police S P Vaid said the slain militants were locals who belonged to Hizbul Mujahideen and were behind an attack on a police party.
"The description of assailants and CCTV footage helped in identifying and arresting two persons, including one who had hurled the grenade at the police party," the DGP said.
More From This Section
He said during interrogation, the arrested persons provided information about the hideout of the militants at whose behest they had carried out the attack.
"The security forces laid a cordon around the area. As they were closing in on the house where the militants were hiding, they (militants) opened fire. The security forces retaliated, leading to death of the two militants," the police chief said.