Indonesian police shot dead an attacker during a firefight at a government office Monday after a small bomb was set off in a public park.
No one apart from the attacker was hurt in the incident in the major city of Bandung on Java island, which police said was linked to a "terrorist network".
It was the latest assault in the world's most populous Muslim-majority country, where there has been a surge in attacks and plots linked to the Islamic State (IS) group.
After the blast at about 8:30 am (0130 GMT), which witnesses said came from a bomb made from a pressure cooker, the attacker fled into a building belonging to local authorities.
Police exchanged fire with the man inside and part of the building was set ablaze during the hour-long standoff.
The attacker, whom authorities did not identify, was shot during the firefight and died later in hospital.
Local police chief Anton Charliyan said nobody else had been hurt and everyone had been evacuated from the building.
"We tried to negotiate but instead the perpetrator tried to burn (the place)," he told local TV station MetroTV.
"He's from a terrorist network," he added, without elaborating.
Charliyan said police seized guns and two backpacks carried by the attacker, without saying what they contained.
West Java police spokesman Yusri Yunus said the man in his 30s or 40s was shot in the stomach and later died.
It was not immediately clear if more than one attacker was involved.
Indonesia, the world's most populous Muslim-majority country, has long struggled with Islamic militancy. It has suffered a series of attacks in the past 15 years, including the 2002 Bali bombings that killed 202 people, mostly foreign tourists.
A sustained crackdown weakened the most dangerous networks but the emergence of IS has proved a potent new rallying cry for the country's radicals and hundreds flocked to the Middle East to fight alongside the jihadists.
A number of attacks and failed plots have been linked to IS supporters in Indonesia in recent years.
Several plots have been either botched or foiled, including a plan to fire a rocket at Singapore from an Indonesian island. Analysts say many Indonesian militants lack the capacity to launch a serious attack.