Prior to a recent trip to Bangladesh, I read the online Dhaka Tribune to get a feel for what is going on there, and I couldn’t help but notice a fairly high degree of violence involving state security forces and Islamic militants, including airport suicide bombings and a siege of an extremist group’s hideout that resulted in significant casualties. But none of this mayhem made it onto the prominent Western media’s radar screen, except for The Economist.

There was no shortage of reporting about Syria, Yemen, Afghanistan, Turkey, Rohingya refugees in Myanmar and the defeat of the Christian ethnic Chinese incumbent in the Jakarta gubernatorial elections by an opponent who shamelessly played the Islamic card, all of which demonstrates that troubles in the Islamic world occupy a very competitive space that suffers from a limited media attention span.

Dial back to last July 1, when the world suddenly discovered with a vengeance the seriousness of the threat from Islamic extremism in Bangladesh. The Holey Artisan Bakery terrorist attack left 29 dead altogether, including 20 hostages, of which seven were Japanese engaged with development projects under the auspices of the Japan International Cooperation Agency. It was a grisly incident that shocked Dhaka society because it occurred in an upscale neighborhood where the wealthy and expats gather, and three of the five youthful terrorists were disaffected men from relatively privileged backgrounds. This discovery sent shudders up the collective spine of the nation’s elite because it meant “they” are now “us.”

Knowing that most militants are from deprived backgrounds is not especially reassuring when that constitutes the vast majority of this nation’s nearly 170 million population, which is packed into a land area smaller than Florida, but it is somehow more alarming when even the scions of the upper crust are joining the fray.

I spoke with one local counterterrorist expert who said that recruiters target troubled sons of the elite precisely because they have a much higher PR value. The media pays more attention than they would to a suicide bomber hailing from one of the thousands of madrassa (Islamic schools) where the less privileged and destitute study. Initially, there was much speculation that the so-called Islamic State orchestrated the Holey Artisan Bakery attack, while the government drew criticism for asserting this was homegrown extremism, pointing the finger at a splinter organization from the local Islamic extremist group Jamaat-ul-Mujahideen. One of the privileged attackers was a Twitter follower of a Bangalore-based IS propagandist, affirming experts’ assessment that social media is the most prevalent means of radicalization.

But just as with the Jemaah Islamiyah attacks in Bali and Jakarta in Indonesia in the 2000s, strong international pressure to pin it on the enemy of the hour — in that case, al-Qaida — proved unwarranted. Like in Indonesia with AQ, Bangladeshi terrorists might be inspired by IS, and may receive limited external assistance and training, but it is essentially a domestic movement that manifests wider trends in the Islamic world. Returnee jihadists who fought in Afghanistan, Iraq and Syria provide expertise while the influx of donations from the Middle East and remittances from overseas workers funds mosque-building and supports clerics who tout a Wahhabist hard line.

I spoke with Mohammed Anwar Hossen, professor of sociology at Dhaka University who has written about “hydro-nationalism” and conducted fieldwork in the nation’s Ganges River Basin region. He links climate change-induced droughts and water diversion due to dams built upstream by India to the rise in religious extremism, pointing out how the lack of water has hammered the livelihoods of over 40 million Bangladeshis in this basin who depend on farming. The state doesn’t provide much support for affected households, leaving the already destitute even more desperate. In his view, the environmental crisis feeding extremism will only intensify with plans afoot in China and India that will divert water from the Brahmaputra River, the other main water supply, potentially affecting 70 percent of the population.

God is the only help on offer, as Islamic groups provide food, medicine and education in addition to spiritual support and guidance. Hossen believes that the resulting sense of obligation inspires blind devotion to local clerics and their fundamentalist message of purification and egalitarianism, one that targets the secular state. He confides that fieldwork there is hazardous as outsiders like him are distrusted and closely monitored in a region where militants administer frontier-style justice.

There was a mass demonstration in front of the country’s Supreme Court on April 21 demanding the removal of a statue of the goddess of justice that was installed there last December. Apparently the statue is visible from the mosque across the street and is seen as an affront to Islamic values because it is female and thus distracting, and because it represents Western jurisprudence, the target of Islamists who advocate adoption of Islamic law (Shariah). This is a hot political issue pitting secularists against religious fundamentalists in a nation where it is open season on free thinkers.

In response to this surge in militancy, security forces have killed the alleged mastermind of the Holey Artisan Bakery attack and at least 50 other militants since that atrocity. They have also nabbed some of the murderers implicated in the so-called blogger killings of 2015, in which those expressing liberal views — including advocates of LGBT rights — were hacked to death by machete-wielding militants.

These attempts to silence secularists were preceded in 2013 by bloody protests, in which 27 died, demanding the state institute a blasphemy law with provision for a death penalty, a tool often used by Islamists in other Muslim-majority nations to persecute political opponents and critics. Prime Minister Sheikh Hasina rejected this demand, arguing that there are already laws in place that enable the government to prosecute anyone harming religious sentiments.

Hifazat-e-Islam, the Islamic group that orchestrated the blasphemy demonstrations, is also involved with the current statue rift and has pressed the government to make religious education mandatory and to abandon gender equality initiatives it calls anti-Islamic.

In Bangladesh’s constitution, Islam is the national religion but secularism is one of the four founding principles of the nation. Islamists have ignited contemporary identity wars in Bangladesh because they can’t abide secularism, with hard-line clerics inciting violence to overturn constitutional principles and the rule of law. Failures of the state have no doubt put wind in the militants’ sails, but for secularists, such flaws pale in comparison to what might ensue under the Islamist opposition.