An army jawan was also injured in the gunfight that is still underway in Tangdhar sector, some 140 km from Srinagar.
The army jawans opened fire on the terrorists when they spotted a group of militants moving from across the border towards LoC at midnight.
This was the second infiltration bid foiled by the security forces along the LoC in the Valley in the past three days, according to defence officials
The army foiled an infiltration bid near the LoC on 16 June morning, killing two militants. One jawan was also injured in the encounter.
It may be recalled on 14 June, an infiltration bid was foiled in Machhil sector of Kupwara district. The two-day operation had left one militant and one soldier dead. Four other jawans were also injured in the operation.