Islamic State has warned of repeated attacks in Bangladesh and beyond until rule by sharia, Islamic law, is established, saying in a video last week's killing of 20 people in a Dhaka cafe was merely a glimpse of what is to come.

Five Bangladesh militants, most from wealthy, liberal families, stormed the upmarket restaurant on Friday and murdered customers, the majority of them foreigners, from Italy, Japan, India and the United States, before they were gunned down.

"What you witnessed in Bangladesh ... was a glimpse. This will repeat, repeat and repeat until you lose and we win and the sharia is established throughout the world," said a man identified as Bangladeshi fighter Abu Issa al-Bengali, in the video monitored by SITE intelligence site.