"Four masked men rushed out of the auto and attacked the officers using swords", national police spokesman Setyo Wasisto told reporters in Jakarta. The attack left one police officer dead and two others injured.
He said a fifth man, who drove the vehicle, was arrested trying to escape.
While the police managed to shoot four of the attackers, the remaining five escaped, said the police chief of Riau.
The attacks have put Indonesia on edge as the world's biggest Muslim majority country starts the holy fasting month of Ramadan from Thursday.
Nokia X6 with 19:9 FullView Display, Dual Rear Cameras Launched
Even though the phone doesn't feature the Android One label, the Nokia X6 still comes standard with pure Android 8.0 Oreo. The Nokia X6 features a 5.8-inch FHD+ (1080 x 2280 pixels) display with 19:9 aspect ratio and 2.5D curved glass.
But the attack comes after a series of suicide bombings by Islamist militants targeting churches and a police building in Indonesia's second-biggest of city of Surabaya over the past few days.
Local journalist Doddy Vladimir, who was at scene of the attack, said he saw a white Toyota Avanza van hit the headquarter's fence at around 9am (02:00 GMT).
"Four have been shot to death and one fled", said spokesman Setyo Wasisto.
"People should take care not to be in places where there might be terrorist attacks, to read the advice, to take notice of what local authorities say and to register (with DFAT via Smarttraveller) so the Australian missions overseas know they're in country".
What next for Iraq as cleric Sadr heads for election win?
On Tuesday, the prime minister called Sadr to congratulate him for the election victory, the cleric's office said. Whoever wins the most seats must negotiate a coalition government in order to have a majority in parliament.
Last year, a suicide bombing at a bus station in Jakarta killed three police officers.
The bombing followed separate attacks on three churches, also carried out by one family, in the same city.
It was not clear if Wednesday's attack was linked to the earlier incidents.
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.
HTC Exodus Is A Blockchain-Powered Smartphone
According to The Next Web , HTC's blockchain phone will be called Exodus and is scheduled for a release at some point in October. HTC plans to use the devices to create a blockchain network which will allow users to trade cryptocurrencies among themselves.