Seven Indian soldiers were killed after militants disguised as policemen stormed a major army base near the frontier with Pakistan Tuesday, as tensions between the two neighbours ran high after weeks of cross-border firing.
Four suspected militants were also killed in the stand-off with security forces inside the command centre in northern Jammu and Kashmir state that lasted most of the day.
It was the most audacious attack on an Indian military base since September, when 19 soldiers were killed in an assault that India blamed on Pakistan-based militants.
The army in a statement said four of its soldiers were killed in the initial assault after heavily armed militants wearing police uniforms stormed the base early Tuesday firing small arms and hurling grenades.
Three army men were killed in a rescue operation after the militants took 16 people hostage inside two buildings used by the families of the army officers.
Two women and children were among the hostages, the army said.
"In this rescue attempt one more officer and two jawans sacrificed their lives," it added
Three bodies of the attackers have been recovered and operation to sanitise the complex continues, the statement said.
One of the dead soldier was a major while the rank of another officer remained unclear.
Earlier a senior local police officer said all four militants were killed in the counter-attack by security forces.
"Now the search operation is going on inside the premises," the officer told AFP on condition of anonymity.
The base is one of four command centres in the restive region and home to over 1,000 officers.
The attack came as Pakistan's hugely popular military chief General Raheel Sharif handed over to his successor on Tuesday with a warning to India not to mistake his country's "restraint" for weakness.
It also comes days before a scheduled visit to India by Pakistan's foreign affairs advisor Sartaj Aziz for a weekend conference on Afghanistan.
"It clearly suggests there is an attempt by certain groups to sabotage the apparent peace outreach by Pakistan's government," said Mohan Guruswamy, head of the Centre for Policy Alternatives think-tank in New Delhi.
India has repeatedly accused Pakistan of sponsoring militant groups such as Lashkar-e-Taiba (LeT), which it blames for the 2008 Mumbai attacks that killed 166 people.
Separately, Indian authorities said three militants were killed in a shoot-out with security forces after crossing into Jammu and Kashmir from Pakistan.
Tensions between the nuclear-armed neighbours have escalated since the September 18 attack on an Indian army base, the deadliest in a decade.
India said after that attack it had launched "surgical strikes" on militant bases across the heavily militarised de-facto border known as the Line of Control (LoC) in disputed Kashmir, a claim Islamabad has denied.
India and Pakistan both claim the region in full and their troops regularly exchange fire across the LoC, but they rarely send ground troops over the line.
Since then there have been repeated incidents of cross-border shelling and gunfire from both sides, claiming the lives of dozens of people, including civilians.
Pakistan said last week that at least nine people had been killed when a shell fired from the Indian side hit a bus.
UN Secretary General Ban Ki-moon said last week he was "deeply concerned" by the deterioration in the security situation in Kashmir and urged both countries to work together to "reach durable peace".
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.