Seven people are dead after attackers detonated suicide bombs and fired shots outside a Starbucks cafe in Jakarta in an assault that police said "imitated" the Paris terror attacks and was linked to the Islamic State group.
All five attackers and two bystanders - a Canadian and an Indonesian - died in the mid-morning explosions and gunfire that were watched by office workers from high-rise buildings on Thamrin Street in the Indonesian capital, not far from the presidential palace and the US Embassy. Twenty people were injured.
"We have identified all attackers ... we can say that the attackers were affiliated with the ISIS group," national police spokesman Major General Anton Charilyan told reporters, referring to Islamic State.
Islamic State backers have circulated a claim of responsibility for the Indonesian suicide attacks resembling the extremist group's previous messages.
The claim was shared on Twitter late on Thursday. The US-based Site Intelligence Group said it was also circulated among pro-Islamic State groups on the message app Telegram.
The message said attackers carried out the assault in Jakarta and had planted several bombs with timers. It differed from Indonesian police on the number of attackers, saying there were four. It said they wore suicide belts and carried light weaponry.
The statement could not be independently verified by The Associated Press, though it resembled previous claims made by the group, which controls territory in both Iraq and Syria.
Jakarta police chief Major General Tito Karnavian told a news conference that the first suicide bombing happened at a Starbucks restaurant, causing customers to run out. Outside, two gunmen opened fire, killing a Canadian and wounding an Indonesian, he said.
A Dutch Foreign Ministry spokeswoman said a Dutch man was seriously injured and was undergoing surgery.
At about the same time two other suicide bombers attacked a nearby traffic police booth, killing themselves and an Indonesian man. Police said that minutes later a group of policemen was attacked by the remaining two gunmen, using homemade bombs. This led to a 15-minute gunfight in which both attackers were killed.
Police then combed the building housing the Starbucks and another nearby building where they discovered six homemade bombs - five small ones and a big one.
"So we think ... their plan was to attack people and follow it up with a larger explosion when more people gathered. But thank God it didn't happen," Mr Charilyan said.
Police said the attackers had links with IS and were part of a group led by Bahrum Naim, an Indonesian militant who is now in Syria.
It was the first major attack in Indonesia's capital since the 2009 bombings of two hotels that killed seven people and injured more than 50. Before that, bombings at nightclubs on the resort island of Bali in 2002 killed 202 people, mostly foreigners.
The attack prompted a security lockdown in central Jakarta and enhanced checks all over the crowded city of 10 million. Thamarin Street is home to many luxury hotels, high-rise office buildings and embassies, including the French.
"This act is clearly aimed at disturbing public order and spreading terror among people," President Joko Widodo said in a statement on television.
"The state, the nation and the people should not be afraid of, and be defeated by, such terror acts," he said.