The encounter began after three bike-borne terrorists opened fire on the CRPF personnel who were posted at a mobile checking unit in the area, officials said.
One CRPF jawan was martyred after being injured in the attack. He has been identified as Rajeev Ranjan, a CRPF spokesperson said.
The security forces retaliated, killing two terrorists, he said, adding that the third militant was captured in an injured condition when he was trying to flee from the spot.
The spokesperson said there were intelligence inputs that terrorists would try to carry out strikes at security installations in Kashmir ahead of the 7th death anniversary of Parliament attack convict Afzal Guru.
The security personnel had been asked to remain on high alert from February 8-14, February 9 being the day Guru was hanged in 2013, February 11 when JKLF founder Maqbool Bhat was hanged in 1984, and February 14 being the anniversary of the Pulwama attack carried out by security forces last year, the spokesperson said.