Colonel Rajesh Kalia said two suspected rebels died Sunday when the army detected a group trying to cross the de facto border dividing Kashmir into Indian and Pakistani sectors.
Three more suspected militants, and an Indian soldier, were killed Monday.
The incidents in northern Tangdhar area, near the heavily militarised Himalayan frontier dividing the nuclear-armed neighbours, could not be independently verified.
Last week India abruptly cancelled a meeting with Pakistan, just 24 hours after agreeing to the rare encounter on the sidelines of the UN General Assembly in New York.
High-level talks between India and Pakistan are rare and the meeting, between their foreign ministers, would have been the first for nearly three years.
New Delhi said it cancelled the talks after the “brutal killings of our security personnel by Pakistan-based entities”.
Last week three policeman were abducted and killed by militants in Kashmir, and a border guard was also murdered in the divided region.
India also objected to the release of Pakistani postage stamps in July “glorifying a terrorist and terrorism”, saying it revealed their “evil agenda”.
Among the commemorative stamps was one of Burhan Wani, a charismatic Kashmiri militant commander killed by Indian troops in July 2016.
His death sparked a wave of violent protests in the part of Kashmir administered by India.
Pakistan Prime Minister Imran Khan called it an “arrogant and negative response” to his calls for the resumption of peace talks.
India’s Foreign Minister Sushma Swaraj said Khan had written to Prime Minister Narendra Modi last week about a “readiness to discuss terrorism” but had shown his “true face”.
India has long accused Pakistan of arming rebel groups in Kashmir, which has been divided between the two countries since the end of British colonial rule in 1947.
India also accuses Pakistan of financing the deadly 2008 militant attacks in Mumbai.
Rebel groups have since 1989 been fighting Indian police and soldiers deployed in Kashmir. They seek its unification with Pakistan or its independence.
Tens of thousands, mostly civilians, have died in the fighting.