The jawans were killed in the Pakistani firing, the official said while refusing to be identified.
Earlier, the same official said that an Indian Army patrol party was ambushed and fired upon by the Pakistani troops, resulting in killing of two soldiers.
On Tuesday, three militants were killed in an overnight encounter with security forces in central Kashmir's Budgam district.
Security forces launched a cordon and search operation in Redbug area of Budgam last evening after receiving specific intelligence inputs about the presence of militants in the area.
The search operation turned into an encounter as the search party of the security forces was fired upon by the militants.
On June 22, the Indian Army gunned down two terrorists and foiled an infiltration bid in Kupwara's Keran sector of Jammu and Kashmir along the LoC.