Four men accused of attacking a police headquarters in Indonesia have been shot dead, according to authorities.
Four men who attacked an Indonesian police headquarters with samurai swords were shot dead and one officer also died, authorities said, days after a wave of deadly suicide bombings claimed by Islamic State rocked the country.
The assault in the city of Pekanbaru on Sumatra island on Wednesday saw a group ram their minivan into a gate at the station and then attack officers with the swords, police said.
It was not clear if the latest incident was linked to other attacks this week, which saw two families - who all belonged to the same religious study group - stage suicide bombings at churches and a police station in Surabaya on Java island, 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 Islamist militancy, including the 2002 Bali bombings that killed over 200 people in the country's worst-ever terror attack.
Police said they shot dead four of the police station attackers and later arrested another who had fled.
One officer was killed by the speeding vehicle and two others were wounded in the incident, they added.
Local media said one attacker may have had a bomb strapped to his body but police have not confirmed the reports. No group has yet taken responsibility for the 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 coordinated 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 organized...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 Koran 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.