Ten people have died in the Indian state of Punjab after a siege at a police station was brought to an end by security forces.
All three attackers were killed, along with seven other people, including the Punjab state police superintendent.
The attackers first hijacked a car then opened fire at a bus station before entering the police station in Gurdaspur district, officials said.
Police believe that the attackers are from Indian-administered Kashmir.
Gurdaspur Police Chief Salwinder Singh told the BBC: "The operation to flush out attackers is over. All three attackers have been killed."
The six victims included four policemen - among them police superintendent Baljit Singh - and three civilians.
The attackers were armed with automatic weapons and dressed in military fatigues.
Such assaults are common in disputed Kashmir, but attacks in neighbouring Punjab are extremely rare.
Gurdaspur's deputy police commissioner Abhinav Trikha told the AFP news agency that the attackers had holed up inside the residential quarters at the police station and were "firing continuously".
"They were dressed in army uniforms and came in a Maruti [Suzuki] car," he told reporters at the scene.
Security forces also found bombs nearby on the railway tracks at the Dinanagar railway station, according to Indian media.
A border district, which has seen violence before: Soutik Biswas, BBC News, Delhi
Gurdaspur is a vast and rural district, not as prosperous as other districts in Punjab. It is not immediately an obvious choice for an assault such as this.
But this is not the first time it has seen such an attack: five years ago people witnessed a bloody gun battle in the district between militants and local policemen.
And it is also one of Punjab's most populous districts, sandwiched between the state's two major rivers, Ravi and Beas, and sharing common boundaries with Indian-administered Kashmir and Pakistan.
Locals believe that this time the gunmen may have come from Indian-administered Kashmir or slipped in through some of the porous parts of the riverine tracts of the international border with Pakistan.
Jitendra Singh, India's junior minister for home affairs, suggested the attackers may have come across the border from Pakistan.
"There have been earlier reports of cross-border infiltration [in Gurdaspur] and Pakistani mischief in the area," he told reporters.
The Pakistani foreign ministry condemned the attack. "Pakistan reiterates its condemnation of terrorism in all its forms and manifestations," it said in a statement.
"We extend heartfelt sympathies and condolences to the government and people of India."