The assault in the city of Pekanbaru on Sumatra island 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 Wednesday’s 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 — and sparked a string of travel advisories from foreign governments — as the world’s biggest Muslim-majority country starts the holy fasting month of Ramadan from Thursday.
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.
The 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 terror suspects.
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.
Its worst-ever attack was the 2002 Bali bombings that killed more than 200 people — including locals and foreign tourists.
Security forces have arrested hundreds of militants during a sustained crackdown since the Bali bombings, and most attacks in recent years have been low-level and targeted domestic security forces.
But on Sunday, a family of six — including girls aged nine and 12 — staged suicide bombings at three churches during morning services in Surabaya, killing 13.
All six bombers died, including the mother who was Indonesia’s first known female suicide bomber. It was also the first time children had been used in such attacks.
A memorial service was held Wednesday for Vincencius Hudojo, 11, and Nathanael Hudojo, 8, two brothers who died after the blast at the Santa Maria Catholic Church on Sunday in Surabaya. Their mother was injured.
Services were also held for Martha Djumani, 54, who was killed in the bombing at a Pentecostal church, just a day after she had got engaged.
“My sister was always caring towards other people and taught her children to be compassionate,” Daud Samari, Djumani’s younger brother, told reporters.
On Monday members of another family blew themselves up at a police station in Surabaya, wounding 10.
The church bombing family were in the same religious study group as the Surabaya police station bombers and a third family believed to be linked to the wave of attacks, authorities said.
“They had the same teacher and they regularly met for Koran recital every week,” said East Java police chief Machfud Arifin.
The coordinated church attack was a sign local extremist groups were becoming more proficient and stir 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 suggests 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 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 curbed after losing most of the land it once occupied in Iraq and Syria.
Police have said the church and earlier police station attacks were likely motivated by the arrest of JAD leaders.
They followed a deadly prison riot staged by Islamist prisoners at a high-security jail near Jakarta last week.