The 11-hour siege of an upmarket cafe in the diplomatic zone of Bangladesh capital Dhaka on Friday (July 1) by seven militants left 20 people dead, most of them foreigners.
The victims had been hacked to death with machetes. At least 30 people were wounded. Two police officers also died in a firefight with the militants.
It was the country's worst terrorist attack since 2005, when Jamaat-ul-Mujahideen Bangladesh (JMB), a local militant group set off a series of bombs throughout Bangladesh in the space of an hour killing at least 25 people.
The Islamic State in Iraq and Syria (ISIS) claimed responsibility for the attack in the early hours of Saturday, and even posted pictures of five grinning fighters in front of a black flag who it said were involved in the attack, according to the SITE monitoring website.
But Home minister Asaduzzaman Khan said the attackers were members of JMB which has been banned by the government. JMB claims to represent ISIS in Bangladesh but has no proven links to it.
Whoever was behind the attack, it marked a major escalation in violence by militants demanding Islamic rule in Bangladesh, whose 160 million people are mostly Muslim. Previous attacks have mostly singled out individuals advocating a secular or liberal lifestyle, or religious minorities.
Prime Minister Sheikh Hasina said the country would stand up and fight the "terror threat".
Here is a look at how the attack unfolded, what we know of the attackers and who were the victims:
9.20pm Friday (11.20pm, Singapore time): Armed men take hostages in Holey Artisan Bakery
The gunmen shouted 'Allahu Akbar' (God is great), and opened fire as they stormed through the doors of the restaurant popular with expatriates. They also set off explosives.
Some diners managed to escape, including the restaurant's Argentine chef and Bangladeshi supervisor. They first took refuge on the roof of the two-storey cafe and then in an adjacent building,
Some managed to speak to relatives by phone, reporting there were up to 40 people trapped inside, around half of them foreigners, the private Ekattur TV station said on Friday night.
The ISIS-affiliated Amaq news agency claimed in a report on Saturday that the militants identified and released Muslim patrons from the restaurant, SITE said. But three of the victims were Bangladeshi, or of Bangladeshi descent.
Italian textile worker Gianni Boschetti had stepped out of the cafe just moments before the attack to take a call on his cell phone. Hiding in the cafe's garden later, he heard "haunting cries" from the terrified hostages before he was able to flee to safety. His 52-year-old wife was among those killed.