The encounter had started last evening in Barbugh area of Shopian district after specific information about some militants hiding in the area, police said.
During searches, the hiding militants opened fire at the security forces who retaliated, leading to a gunfight which continued till this morning, a police spokesman said.
"Two terrorists were gunned down in this encounter who were identified as Altaf Ahmad Rather and Tariq Ahmad Bhat. One terrorist identified as Adil Hussain Dar surrendered before the security forces," he said.
The slain militants were involved in attack on SPO Khursheed Ahmad Ganaie, the spokesman said.
Tariq was involved in the attack on security forces' convoy at Chakoora in Shopian, the spokesman said.
Tariq was also involved in attack on SI Gowhar Ahmad Malla at Barbugh and in the bank robbery at Turq Wangam.