Bangladesh has suffered a wave of extremist attacks recently targeting atheists, religious minorities and other so-called enemies of Islam, many of which, including the hostage taking, have been claimed by Islamic State.
The Bangladeshi government, which has been cracking down on extremist groups for several years, has dismissed the IS claims as opportunistic, and says none of the attacks has been orchestrated from abroad.
Instead, the government accuses home-grown militant groups of waging the violence in order to create political chaos in the country and undermine the secular government.