"Two militants were killed and four army personnel including a major sustained injuries in the gunfight," an army spokesman said here.
The injured armymen have been evacuated to army's base hospital in Srinagar, he said.
The militants have been identified as Shabir Ahmad and Aashiq Ahmad Dar, both of Hizbul Mujahideen, police 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.
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 on, police said.