The Army has also recovered three AK-47 rifles from the terrorists.
The area has been cordoned off. The bodies were recovered from Awoora village.
"An operation against the militants resumed on Monday morning after it was suspended on Sunday evening," a senior police officer said.
The gunfight erupted on Sunday following information about the presence of the militants hiding in a house in the village.
On Sunday another encounter broke out between militants and security forces in south Kashmirs Anantnag district, police said.
Acting on specific intelligence input about the presence of unspecified number of militants in Awoora village in Pahalgam area of the district, security forces launched a search operation in the area, a police official said.
As the forces were conducting the search operation, the hiding militants fired at them, he said, adding the security forces retaliated, ensuing in an encounter.