Police overcame heavily armed men dressed in military fatigues on Monday after a 12-hour gun battle that left at least nine people dead at a police station in Punjab, close to the border with Pakistan.
Police killed three unidentified attackers who had pulled up at the police complex in a stolen white car, automatic weapons blazing, at about 5 am.
Prime Minister Narendra Modi and his top ministers have not made detailed statements on the attack, which is certain to raise tensions with Pakistan if it is proven to have originated across the border.
Three policemen and three civilians were also killed, according to the home ministry.
The siege focused on an abandoned building where the attackers holed up. It dragged on because security forces had wanted to capture at least one of the militants alive, a senior government source said. TV reports say one terrorist has been caught alive.
Police sources added that the attackers entered India from Pakistan two days ago in the troubled state of Jammu and Kashmir, a short distance to the north.
Jitendra Singh, a junior minister in Modi's office, said he did not rule out Pakistan's involvement.
"There have also been earlier reports of Pakistan infiltration and cross-border mischief in this area," said Singh, whose constituency in the Jammu region borders Gurdaspur.
Rare attack in Punjab
Attacks on security installations by militants dressed as soldiers or police are common in Jammu, but Monday's was the first such assault in Punjab in 13 years, according to data from the South Asia Terrorism Portal, which tracks militant violence. Now nuclear-armed rivals, India and Pakistan have fought three wars since both nations gained independence in 1947.
Pakistan has denied any involvement in insurgencies in Punjab and Jammu and Kashmir and Islamabad's foreign office said it was not aware of any reports that the people involved in Monday's attack were Pakistani.
Home Minister Rajnath Singh said he had spoken to the head of the Border Security Force and 'instructed him to step up the vigil' on the border. "The situation is under control," Singh told reporters.
Five bombs were also found on a railway track in the state, in a possible sign of an attempted coordinated attack.
The group of about five attackers came in a white Maruti-Suzuki car, dressed in army uniforms, an official said.
India fought a Sikh insurgency in Punjab in the 1980s that peaked with the assassination of Prime Minister Indira Gandhi at the hands of her Sikh bodyguards in 1984.
That attack was in retaliation for her decision to order the army to flush out militants from the Golden Temple in Amritsar, the holiest shrine of the Sikh community.
Sikh militant groups were demanding an independent homeland for minority Sikhs at the time, which they called Khalistan.
"The remnants of that movement are still being hosted and protected in Pakistan. That is who I assume would be behind it eventually. Directions would have come from there," said Ajai Sahni, executive director of the Institute for Conflict Management in New Delhi.
Hasan Askar Rizvi, a political analyst in Pakistan, rejected Sahni's theory.
"There is no information on this side to show support of Khalistan movement," he said. "You can’t support a movement that doesn’t exist on the ground (in India)."
Earlier this month, Modi met his Pakistan counterpart Nawaz Sharif and agreed top security officers from the two countries would meet to discuss counter-terrorism. Modi also agreed to visit Pakistan next year.
On Monday, the opposition Congress party accused Modi of appeasing Pakistan and there were rowdy scenes in parliament, where members of the Lok Sabha demanded a resolution condemning the attack.
(With inputs from agencies)