On Friday, militants stormed a restaurant and bakery in Dhaka's high-security diplomatic zone, butchering 20 foreigners and initiating a gun battle that left six terrorists and one police officer dead.

After the siege had ended, Bangladeshi Prime Minister Sheikh Hasina said the country's security forces had been able to save 13 people from being executed by the militants. But an overview of social media use by the "Islamic State" (IS) shows how security forces may have come up short during the operation.

In the siege, 20 foreigners, two police officers and six militants were killed

IS has been stepping up attacks in Bangladesh in recent years, DW's social media expert in Germany said, adding that the group seemed to have a uniform strategy before and after every strike.

"The Islamists' research is very thorough and they find reasons to kill people. Once they murder the victim, they release 'press statements' to justify the person's death. These are accompanied by lines from the Quran and the victims are pronounced guilty for being Murtada - or carrying an Islamic name but speaking against the religion," the social media expert explained. The militants use machetes because it is considered more Islamic than killing someone with a bullet.

IS posted 'updates'

On Friday, monitoring the internet for updates on the IS siege in Dhaka, showed IS militants were using Twitter and the instant messaging app Telegram to "report" on their attack's progress. Security forces seemed to have paid no attention to these crucial clues, the expert said.

Bangladesh soldiers taking positions near the Holey Artisan cafe

"IS warned long ago that it would stage attacks during Ramadan in many countries, including Bangladesh. The government seems to have paid no attention," he said.

Shortly after the militants stormed Dhaka's Holey Artisan Bakery and O'Kitchen restaurant on Friday, IS published an update. "The IS claimed responsibility for the attacks through its news agency Amaq," a statement tweeted by the intelligence group SITE's head reported. A verified account of the Syrian citizen journalism group, Raqqa SL, had earlier posted the original pictures.

Security forces also wasted a lot of time preparing layout maps of the restaurant, but these were available on Google.

Relatives waiting near the cafe for hostages to be released

"A few hours into the siege, the IS published pictures of hacked people, a while before Bangladesh police stormed the venue of the attack," DW's social media expert explained. "One could make out the pictures were from the restaurant because of the furniture. The militants had also brought in a gas cylinder to blow up the place in case things didn't go their way," he added.

Bangladesh security forces ended the 10-hour siege early on Saturday morning, reporting that the dead included an Indian, a US citizen, nine Italians and seven Japanese nationals. Many more are still missing.

Prime Minister Sheikh Hasina has announced two days of mourning for the attacks and appealed to all "to face terrorism by involving anti-terrorism committees, community police and the general people."

mg/jm (DW, Reuters, AP)