Over the past year, Bangladesh – an overwhelmingly Muslim country of 150 million people – has seen growing violence against both foreigners and locals deemed to be enemies of extremist Islam: secular bloggers, outspoken critics of fundamentalism, members of religious minorities such as Hindus and Christians, police officers and others.

Until now, the violence has taken the form of largely low-tech attacks involving small groups of militants or even individuals armed with knives or small arms.

Friday’s attack, however, was an operation of a much greater magnitude. Early reports suggest at least five gunmen, armed with sufficient automatic weapons and grenades to repel at least one assault by local police.

Western intelligence have been nervous about a major operation for at least 18 months. Indications of a complex plan to attack a diplomatic ball last year prompted much alarm – and pressure from western capitals on Dhaka to move effectively against the militant networks existing in the unstable south Asian nation.

This did not happen. The Awami League government of Hasina Sheikh has instead looked to extract political advantage from the situation, either blaming what is left of the political opposition in Bangladesh, or denying outright that militant networks linked to organisations such as Islamic State or al-Qaida even existed in the country, despite their claims of responsibility for successive killings.

Instead of cracking down on the hardline groups which encouraged, or even sponsored, the attacks on local bloggers and minorities, the government effectively made concessions to the conservatives, with the prime minister implying those who had insulted religious sensibilities were in part responsible for their fate. Bloggers seeking police protection were ignored.

So who might be responsible for this attack? Late on Friday, Islamic State claimed the attack through its affiliated Amaq news agency, but the group’s involvement could not be confirmed. Both Isis and al-Qaida have been targeting Bangladesh as an area of potential expansion. Indeed, the rivalry between the two is key. Isis has mentioned Bangladesh frequently in its propaganda, while al-Qaida has devoted entire videos to the country, calling on Muslims in the country to rise up against their “apostate” rulers.

But Bangladesh is far from the central zone of activity of Isis in the Middle East, and the organisation has never had a strong presence in south Asia. Al-Qaida, in contrast, was founded in Pakistan in 1988 and has been a permanent presence in the region since 1996. It sees the region as central to its strategy and survival.

In 2014, al-Qaida’s leader, Ayman al-Zawahiri, announced the formation of a new affiliate, al-Qaida in South Asia (Aqisa), and said its zone of operations stretched from Afghanistan to Bangladesh. So far, Aqisa has failed to make its mark but it is entirely possible that the attack in Dhaka is its latest attempt to do so.

Can Bangladesh respond? There has been significant US and UK involvement with security services in Bangladesh aimed at reinforcing capabilities. The controversial Rapid Action Battalion (RAB) has been the recipient of some aid – and has been accused of systematic human rights abuses.

The violence in Bangladesh over recent years has attracted some interest from the press but very little from policymakers around the world. Bangladesh, though in a key pivotal position between the Asia Pacific region and South Asia, has not been a priority in Washington, London or elsewhere. There has been some focus on the economy – which remains relatively healthy – but few have paid much attention to the increasingly restricted space in the troubled country for political dissent, pluralism or traditional moderate strands of observance.

This attack, however it ends, will make it much more difficult for both authorities in Dhaka and international observers to ignore the threat of extremist Islam in one of the biggest Muslim majority countries in the world.