This was the second such bid foiled by the security forces along the LoC in Kashmir in three days.
The gun battle began when the army spotted some movement in the area. According to officials, a group of militants near the LoC who were trying to cross into the Indian side of Kashmir but were interrupted by the army.
The operation according to officials is in progress.
Earlier on Tuesday, an infiltration bid was foiled in Machhil sector of Kupwara district. One soldier and a militant were killed in the two day operation. Four other soldiers also sustained injuries in the operation.
Last month, the army predicted that this summer would see an increase in such infiltration bids.
Official figures for 2016 have touched 45 for the first four months, a sharp spike from the 35 terrorists who crossed the Line of Control in 2015.
In the last week of May, two separate attempts were foiled by the army, leading to six militants being killed. However, one soldier was also killed in the operation.