One police officer is believed to have died in the attack at the Riau police headquarters in Pekanbaru and several journalists, who were at the police station for an unrelated press conference, were injured. Two other police officers were also injured.
The attack comes as police conduct a massive crackdown on militants who have taken to using children as suicide bombers.
One police officer, who was hit by the car, died in the attack and the four men were shot dead.
Images from the scene show one of them lying dead on the ground with a long bladed machete in his hand.
MORE: Imprisoned terrorists kill five officers
Police have seized three machetes, five face coverings, three pairs of shoes, a damaged handycam, a jacket and watch, he said.
“This is the success of Riau police in foiling this attack from a group of unknown people,” Mr Wasisto said.
A spokeswoman for Foreign Affairs Minister Julie Bishop said the Department of Foreign Affairs and Trade was monitoring the situation closely.
Earlier today, Ms Bishop said if she had a trip planned to Bali at the moment she would still go.
“We encourage people to take responsibility for their own safety. There is a lot of advice set out in the Smart Traveller travel warning and I do urge anyone seeking to travel to Indonesia to read it,” she said.
“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 Smartraveller) so the Australian missions overseas know they’re in country.”
The latest attack comes after 18 people died on Sunday at three different churches in Surabaya, including the six family members who executed the attacks. Another 41 people were injured in the blasts.
Police chief General Tito Karnavian said the father detonated a car bomb, two sons aged 18 and 16 used a motorcycle for their attack, and the mother and her two daughters wore explosives.
A matter of hours after the church attacks, three people in one family were killed in an accidental explosion at an apartment in Sidoarjo, not far from Surabaya. It is believed they were making bombs for another attack.
Indonesian police chief General Tito Karnavian said that at a local level the attacks appeared to be revenge for the continued detention and trial of Indonesian terrorist leader, Aman Abdurahman, who is currently before the courts for inspiring the January 2016 attack on a Starbucks café in Jakarta.
“Using children, this is the first time in Indonesia. A nine-year-old and a 12-year-old kid with a bomb on their waist and then committing suicide,” General Karnavian said, adding this was something frequently done in Syria but never on home soil.
Police have said that the attackers are all members and supporters of Indonesian terror group, Jemaah Ansharut Daulah or JAD, which was formed in 2015 and according to the US State Department is made up of about 24 Indonesian extremist groups who have pledged allegiance to the IS leader Abu Bakr al-Baghdadi.
General Karnavian said the orders for the bombings came from Islamic State central and that pipe bombs were used, made from a chemical called triacetone triperoxide or TATP, a high explosive used in Iraq and Syria where it is called the “Mother of Satan” because of its volatility and ability to cause mass carnage.
The latest wave of Surabaya attacks came just days after a deadly 36-hour standoff in a high-security Jakarta prison housing terrorist inmates, in which five specialist counterterrorist police were killed, along with other terror suspect.