Armed militants attacked an Indian army base near the border with Pakistan early Tuesday, killing two soldiers, police said.
The attack comes at a time of heightened tensions between the nuclear-armed neighbours following a deadly assault on an Indian army base in September that New Delhi blamed on Pakistan-based militants.
"Three to four militants entered the Army Corps headquarters at Nagrota and fired towards the officers' mess," a senior police officer told AFP, referring to a town in northern India roughly 20 kilometres (12 miles) from the border.
"Two officers were killed and an exchange of fire is on," he told AFP by phone, speaking on condition of anonymity.
"Early morning an encounter took place and terrorists have entered one of our military areas. The situation is under control, as soon as the operation is over we will be able to give details," he told reporters.
"Terrorists are armed, they have weapons, and that is why firefight is taking place."
Nagrota is in the northern state of Jammu and Kashmir, which borders Pakistan and has seen repeated outbreaks of cross-border firing between Indian and Pakistani troops in recent weeks.
The rise in violence follows the September attack, in which 19 Indian soldiers were killed, the deadliest such incident in a decade.
New Delhi blamed Pakistan-based militants and responded by launching what it called "surgical strikes" on militants across the heavily militarised border, sparking fury from Islamabad, which denied they took place.
Indian and Pakistani troops regularly exchange fire across their Kashmir border known as the Line of Control (LoC), but rarely send ground troops over the line.
Kashmir has been divided between India and Pakistan since their independence from Britain in 1947. Both claim the territory in full and have fought two wars over the mountainous region.