The men had driven their car into the police yard before getting out to stage the attack, Setyo Wasisto, national police spokesman, told a briefing.
Two officers were wounded in the attack, while another was killed after one of the perpetrators tried to escape and crashed into the officer, he said.
“The one who escaped has been captured and secured at Pekanbaru police station,” Wasisto said.
The spokesman said that a journalist who had been at the police station was also hurt after being hit by the car.
Earlier, an internal police report said that one of the dead men had a suspected bomb strapped to his body. Wasisto did not comment on this.
TV footage showed one man lying on the ground with a long sword next to his body and an armoured car stationed outside the police station.
A police spokesman in Riau said they had not identified the perpetrators yet or determined their motive.
The suicide bombings, involving families with young children, and an explosion at an apartment where terrorists were suspected to have been constructing bombs have left around 30 people dead, including 13 suspected perpetrators, police said.
The attacks are the worst in the world’s biggest Muslim-majority country since the bombing of tourist-packed restaurants in Bali in 2005.
In a message carried on its Amaq news agency, ISIS has claimed responsibility for the attacks in Surabaya.