The scene had echoes of the Paris attacks: A bustling shopping area shaken by the blasts of suicide bombers and gunfire as onlookers fled in terror.
But when Thursday's assault in central Jakarta was over, the death toll was far lower. Of the seven killed, five were the attackers themselves and only two were civilians - a Canadian and an Indonesian. Another 20 people were wounded.
Thursday's attack in central Jakarta left residents in Indonesia's capital in fear for about five hours, until police said the area was secure. But the violence did not last nearly as long, perhaps well under 30 minutes. Gunfire was heard after that, but the only people firing were evidently police.
Here is a brief account of what happened from police and a witness:
• At about 10:50 a.m. (5.50pm NZ time), a suicide bomber walked into a Starbucks and set off his explosives. He was the only person killed in the blast.
• As customers ran out, two gunmen outside opened fire, killing a Canadian man and wounding an Indonesian. A witness, Guruh Purwanto, said the gunmen then ran into a nearby theater.
• At about the same time, two other suicide bombers attacked a traffic police booth nearby, killing themselves and an Indonesian man.
• Minutes later, the two gunmen attacked a group of policemen, sparking a gunbattle that lasted about 15 minutes and ended with both attackers dead. Purwanto said the two attackers blew themselves up.
Who is responsible?
Supporters of the Islamic State group circulated a claim of responsibility on social media resembling the militants' previous messages.
Indonesian police say they believed Bahru Main, an Indonesian currently thought to be in Syria had masterminded the attack.
National police spokesman Maj Gen Anton Charilyan said the militants had imitated the recent Paris attacks.
"We have identified all attackers," Charliyan said. "We can say that the attackers were affiliated with the Isis group," he added, using an acronym for the Islamic State group.
How many attackers were there?
Police had initially warned there could be as many as 14 attackers but later said the situation was "under control" and five militants, including a foreigner, were killed.
However, Isis has put the number of militants at four.
Death toll
At least two civilians were reportedly killed in the attack on Starbucks.