NEW DELHI (AFP) - A slaughter of foreign hostages has put Bangladesh firmly on the frontline of the global war on terror despite government efforts to portray a campaign of attacks as the work of domestic opponents, according to analysts.
Several dozen people have been killed by militants in Bangladesh in the last two years, with the victims including mainly local atheist bloggers, Hindus, gay activists and liberal academics.
But while those attacks generated few column inches beyond Bangladesh, this weekend's hostage siege in a Dhaka cafe led news bulletins around the world, attracting the kind of attention its perpetrators had long been craving.
Analysts said the choice of venue, target, timing and method of killing were all designed to maximise publicity for jihadists who were well aware of the outrage that greeted recent massacres in Orlando and Paris.
Eighteen of the 20 civilians who were killed in the Holey Artisan Bakery were foreigners. Nearly all were hacked to death with machetes, even though the hostage-takers had plenty of firearms.
The attack was even more shocking as it came on the final weekend of Ramadan, with survivors describing how the hostage-takers made clear their targets were non-Muslims, separating the locals from the foreigners.
Around 90 per cent of Bangladesh's 160 million people are Muslims but the state is officially secular.
"By hacking people to death... they wanted to show the world that they can go to any extent for jihad," said K G Suresh, a senior fellow at New Delhi's Vivekananda International Foundation think-tank.
"Once they attack a restaurant popular with foreigners on a Friday night their message is clear who they want to go after. By sparing Muslims, they wanted to send out the message that they are only against Westerners."
According to the monitoring group SITE, the Islamic State organisation (ISIS) claimed responsibility for the attack which it said had targeted "citizens of crusader states".
But Prime Minister Sheikh Hasina's secular government has long insisted neither ISIS nor Al-Qaeda have gained a foothold in Bangladesh despite both groups claiming many previous attacks.
That line was reiterated by Home Minister Asaduzzaman Khan, who told AFP that six gunmen killed at the end of the siege were members of Jamaeytul Mujahdeen Bangladesh, a domestic group which has been banned for a decade.
He denied any link with ISIS but analysts said that stretched credibility.
Taj Hashmi, a Bangladeshi who teaches security studies at Austin Peay State University in the US, said there could be "no ambiguity" that the attack was the work of ISIS.
"Bangladesh must admit that international Islamist networks are actively engaged in killing people in the country and they are not through yet," said Hashmi.
Mubashar Hasan, an expert on political Islam at Dhaka's Liberal Arts University, said the attack was not merely a local difficulty but was the latest in a line that stretched back to the bombings in New York and Washington on Sept 11, 2001.
"This is Bangladesh's 9/11. Bangladesh has now entered into the global war on terror," Hasan told AFP.
Critics have said the violence stems from the government's refusal to allow its opponents to operate freely in the political mainstream.
Bangladesh's main Islamist party has been banned and most of its leaders have been arrested or else executed after recent trials over their role in the 1971 war of independence from Pakistan.
Opposition leader Khaleda Zia is facing a string of court cases for her role in violent anti-government protests.
Zia's party boycotted the 2014 general election after Hasina refused to allow it to be overseen by a neutral caretaker government as in the past, and Hasan said growing extremism was an inevitable consequence.
"A dysfunctional state and lack of democracy made it fertile ground for terrorism," said Hasan.
Columnist Zafar Sohban urged the government to end "its state of denial".
"It cannot continue to bury its head in the sand about the clear and convincing evidence of transnational links to domestic terror groups and operations," he wrote in the Dhaka Tribune.
Subhash Agrawal, of the Delhi-based India Focus political risk consultancy, said the recent arrests of thousands of Bangladeshis that the government says was organised to eradicate extremism had been counter-productive.
"She has been focusing on her political opponents and going after Begum Khaleda Zia's people while turning a blind eye to the alarming political and social polarisation in her country," Agrawal told AFP.
"Arresting so many people is simply stupid."