Security forces, during a cordon and search operation, zeroed in on a location near a house in the district's Kakriyal area, and surrounded the terrorists, officials said.
The encounter broke out as the security forces, comprising CRPF, police and Army personnel, closed in on them, they said.
Security forces used drones and choppers in the operation, which was launched Wednesday to track three JeM militants, aged between 18 and 22 years, the officials said.
Two terrorists were killed and eight security personnel, including Deputy Superintendent of Police (DSP) Mohan Lal, injured, police said.
Five CRPF personnel and three policemen were injured during the operation, they said.
They were admitted to the Narayana hospital in Katra.
The cordon and search operation to track down the JeM terrorists was launched in the Jhajjar-Kotli forest belt in Jammu and Reasi district after the militants fired on security personnel on the Jammu-Srinagar National Highway on Wednesday, the officials said.
The militants after the incident had fled into the forest belt of which Kakriyal is a part.
Speaking to reporters, the villager said, "They came to my house at 8 pm and demanded clothes to change from their(combat) dress. They demanded food. They ate biscuits and drank water and left around 9.10 pm."
The terrorists also demanded a vehicle, but "we told them, we do not have one," the villager said, adding that they were asked to switch-off their mobile phones.
The official said the family immediately informed the police after the terrorists left.
The CRPF, the police and the army along with personnel from other security agencies are combing the area, he said.
More checkpoints have been created and vehicles are being searched and passengers frisked, he said.
"The Jhajjar Kotli forests and adjoining areas have been put under a massive cordon," the official said.
Traffic movement on the highway, between Nagrota and Jhajjar Kotli, has been suspended and schools in the area have been closed for the day.
(This story has not been edited by Business Standard staff and is auto-generated from a syndicated feed.)