One militant was also injured in the firing and is reported to have been killed, however, the Army said they cannot confirm it till the body is recovered.
The encounter took place in Handwara area of the district during a search operation.
"Army and police launched a cordon and search operation in Hamlapati area of Handwara following information about presence of militants there," an army spokesman said.
He said one militant tried to break the cordon by opening fire on the security forces, who retaliated.
"We cannot confirm the death of the militant till the body is recovered," he said.