The army said a group of about seven militants had been fighting with Indian troops in forests of the northern district of Kupwara, and that just two militants appeared to be still holding out after the others had been shot dead.
"Five militants, two policemen and two soldiers have been killed," Indian army officer Syed Ata Hasnain told reporters in Srinagar, the main city of Indian Kashmir.
"They are from the Lashkar-e-Taiba group," Hasnain said, referring to the Pakistan-based militant group active in Kashmir and blamed for the 2008 Mumbai attacks that left more than 160 people dead.
Kupwara district borders Pakistan-administered Kashmir, and Hasnain said the militants had recently crossed into the Indian sector.
Pakistan denies Indian allegations that it arms militants and sends them over the de facto border known as the Line of Control.
There are nearly a dozen Kashmir militant groups fighting for the divided Muslim-majority region to become part of Pakistan.
More than 47,000 people have been killed since the outbreak of the separatist insurgency in Kashmir in 1989.