Security forces cordoned off the Mir Mohalla village in Hajin area of the district following intelligence inputs about the presence of militants there.
The security forces fired tear smoke shells to disperse the protesters, who kept on regrouping to continue the stone pelting. The militants, however, managed to escape from the security forces' cordon, the official said.
The police official said that one of the slain terrorist has been identified as Ali Bhai, a LeT terrorist from Pakistan.
Jammu and Kashmir Police constable Zahir Abbas was also killed in the gunbattle. Last Sunday, a terrorist was gunned down by security forces in Handwara region of the state after an encounter broke out between the security forces and militants following a search operation. However, SOG man later succumbed, they said. Another policeman was critically wounded in the gunfight. The Ikhwan was responsible for wiping out extremism in the mid-1990s as a sizeable militants surrendered before the Army to join the group. However, when there was no firing, it was believed that both the militants have been killed.
The terrorists, however, managed to escape and security forces were making efforts to track them down, they added.