"Two militants have been killed while an Army major and another soldier have suffered injuries in the gunfight," police said.
The militants have been identified as Shabir Ahmad and Aashiq Ahmad Dar, both belong to Hizbul Mujahideen, they said.
The encounter began yesterday after security forces received specific intelligence input about the presence of militants in Hef Shermal area of Shopian, 52 kms from here.
As the joint team of police and Army began a search operation in the area, the hiding militants opened fire on them triggering an encounter.
The operation was halted during the night and resumed in the early hours today and two militants were gunned down, a senior police official said.
The operation is still in progress, police said.