Four men were shot and killed as they staged an attack on a police headquarters that left one officer dead and two wounded, Indonesian authorities said on Wednesday, after a wave of deadly suicide bombings claimed by the Islamic State group.
The latest assault in Pekanbaru on the island of Sumatra saw a group ram a minivan into a gate at the station and then attack officers with samurai swords, according to the country's national police.
It was not clear if Wednesday's incident was linked to the earlier attacks which saw two families who knew each other and belonged to the same religious study group stage suicide bombings at churches and a police station in Surabaya, Indonesia's second biggest city.
The attacks have put Indonesia on edge as the world's biggest Muslim majority country starts the holy fasting month of Ramadan from Thursday.
This week's bloody violence is putting pressure on lawmakers to pass a stalled security law that would give police more power to take pre-emptive action against people suspected of planning terror attacks.
Indonesia -- which is set to host the Asian Games in just three months and an IMF-World Bank meeting in Bali in October -- has long struggled with militancy, including the 2002 Bali bombings that killed over 200 people -- mostly foreign tourists -- in the country's worst-ever terror attack.
On Wednesday, police said they shot dead four of the attackers at the Sumatra police station and later arrested another who had fled.
Indonesian media said one attacker may have had a bomb strapped to his body but police did not immediately confirm the reports.
No group has yet taken responsibility for Wednesday's attack.
Indonesia's security forces have arrested hundreds of militants during a sustained crackdown that smashed some networks, and most recent attacks have been low-level and targeted domestic security forces.
Last year, a suicide bombing at a bus station in Jakarta killed three police officers.
But on Sunday, a family of six -- including girls aged nine and 12 -- staged suicide bombings of three churches during morning services in Surabaya, killing 13.
All six bombers were killed, including the mother who was Indonesia's first known female suicide bomber.
The next day, members of another family blew themselves up at a police station in the city, wounding 10.
The co-ordinated church attack was a sign local extremist groups were becoming more proficient, and stirs concerns about an uptick in extremism as hundreds of Indonesians who flocked to fight alongside Islamic State in the Middle East return home.
"They were better organised...and suggest a higher level of capacity than what we have seen in recent years," said Sidney Jones, director of Jakarta-based Institute of Policy Analysis for Conflict.
The church bombing family were in the same religious study group as the two other families linked to the attacks, police said.
"They had the same teacher and they regularly met for Holy Qur'an recital every week," said East Java police chief Machfud Arifin, adding that police were pursuing the teacher for questioning.
The families have been linked to the local chapter of Indonesian extremist network Jamaah Ansharut Daulah (JAD), which police said was behind the attacks.
The radical group supports Islamic State, whose ambitions have been reined in after losing most of the land it once occupied in Iraq and Syria.
Police have said the church and earlier police station attacks were motivated by the arrest of JAD leaders, including jailed radical Aman Abdurrahman.
They followed a deadly prison riot staged by Islamist prisoners at a high-security jail near Jakarta last week.