The attack in Solo city, the country’s radical heartland and the hometown of President Joko Widodo, came as the Indonesian leader was preparing to visit to celebrate the Islamic holiday of Eid with his family.
The authorities in the world’s most populous Muslim-majority nation are on alert a day before Eid, amid fears IS-linked militants could launch fresh attacks after a deadly assault in Jakarta in January.
Police said they suspected the attacker was a man called Nur Rohman, who is allegedly part of a network controlled by Bahrun Naim, an Indonesian militant fighting with IS in Syria.
Rohman escaped an anti-terror operation just before New Year that authorities said foiled a series of attacks, according to police.
Tuesday’s attacker got past a guard post and into the yard of the police headquarters in Solo on Java island early in the morning and was heard citing Islamic verses, police sources said.
He detonated his explosives and died after being confronted by a police officer, who suffered an eye injury and burns.
“He forced his way in using a motorbike and blew himself up,” said national police spokesman Boy Rafli Amar, adding that the attack was “definitely” linked to IS.
Widodo called for people to remain alert after the assault, which happened on the last day of the Islamic fasting month of Ramadan.
“I have ordered the police chief to hunt down and catch the network linked to this suicide bombing,” he said.
The gun and suicide bombing attack in Jakarta earlier this year killed four civilians and four assailants. It was claimed by IS and was the first major Islamist terror attack in Indonesia for seven years.
Indonesia has suffered several Islamic extremist attacks in the past 15 years, including the 2002 Bali bombings that killed 202 people.
A crackdown had weakened the most dangerous networks but the emergence of IS has proved a potent new rallying cry for Indonesian radicals, with hundreds heading to fight in the Middle East.
Last month police arrested three suspected militants accused of planning to launch IS-inspired suicide bombings in the city of Surabaya.
Solo is considered a hotbed of radicalism and is where firebrand cleric Abu Bakar Bashir, now in jail, ran an Islamic boarding school that trained militants.