Image copyright EPA

The timing, the target and the message of the attack on the Holey Artisan Bakery in Dhaka was loud and clear.

The Islamist militants struck on the last weekend before the Muslim religious festival of Eid al-Fitr. Dozens of diners were at the cafe, which is popular among foreigners and middle-class Bangladeshis.

The Gulshan district is a high-security area and considered among the safest places in the capital. Several embassies and non-governmental organisations are based in the neighbourhood and hundreds of foreigners and wealthy Bangladeshis live there.

The government had stepped up security after an Italian aid worker was killed in the area by suspected militants in 2015. It is difficult to travel through Gulshan without passing through a security check post. But the latest attack has shown that even Gulshan is not safe.

Over the past three years, more than 40 people have been killed in Bangladesh by suspected Islamists. But the attacks were mostly targeting individuals - secular bloggers, writers, activists, academics and members of religious minorities.

The attack on the cafe was on a different scale. It seems to have been well planned and well co-ordinated.

Image copyright AP

The militant group Islamic State says it carried out the attack although the government in the past has denied its presence in the country. But the co-ordinated assault has underlined concerns that global Islamist groups may be securing a presence in Bangladesh.

The Bangladeshi government has come under criticism for what many experts describe as a "state of denial" on the presence of increasingly assertive Islamist groups in the country.

The government argues the attacks are sporadic and that it is very much in control. It points out that the powerful Bangladeshi army is well trained and well-equipped to face any threats. But the increasing violence is likely to cause significant damage to the country's image and, more importantly, trigger insecurity among religious minorities in the country.

"After a spate of attacks on minorities, Hindus, Buddhists and Christians in Bangladesh are feeling insecure and helpless," says Rana Dasgupta, General Secretary of the Bangladesh Hindu-Buddhist-Christian Unity Council.

"The fundamentalist forces are trying to drive us out of the country. But the government has initiated some action against the militants and our prime minister, Sheikh Hasina, is sincere in combating fundamentalism and terrorism."

Large holes exposed

Bangladesh's efforts in tackling extremism and militancy have been commended by the United States and neighbouring India. A decade ago, the South Asian nation was gripped by fundamentalist violence, but over the years, successive governments, particularly the governing Awami League, have taken stern action against Islamist militants.

The government has also co-ordinated several counter-terrorism measures with Western nations. But extremist-related violent incidents are on the rise again.

Following widespread criticism over the increase in violence in the past few years, the government launched a concerted drive against militants by arresting thousands of people. But the main opposition, the Bangladesh Nationalist Party (BNP), says the government is using the operation to target political opponents.

Bangladesh is a Muslim-majority nation and often seen as a model Muslim country because of its secular values and its development-oriented policies.

After years of political violence, it has been enjoying some sort of stability. The country's economy has been growing consistently at a rate of 6-7% for several years. The stability has also attracted many foreign investors, and the global garments industry looks up to Bangladesh.

Last year, Bangladesh exported more than $25bn ($18.8bn) of ready-made clothes, mostly to Western nations. The thriving garments industry and remittances from Bangladeshis working abroad have also helped to lift millions of people out of poverty. Hundreds of foreigners, many of them businessmen, visit Bangladesh as the country still offers plenty of opportunities.

It is clear that the government has been caught unaware, and the cafe attack exposes a big hole in Bangladesh's intelligence-gathering and security system. Some even question the government's political will and commitment.

As a result, there are concerns that if the government fails to recognise its shortcomings, it may end up reversing years of economic growth and stability.