OVER the past three years, Islamist terrorists have killed more than 40 people in Bangladesh, usually by hacking them to death with machetes. The victims had offended their murderers by being gay, non-Muslim or critical of Islamist parties. The government has done shamefully little to end the carnage.

However, a recent murder seems to have shocked it into action. On June 5th the wife of a police officer investigating a militant group was hacked and shot dead in front of her six-year-old son. Five days later Sheikh Hasina, the prime minister, promised to catch “each and every killer” and accused the main opposition party, the Bangladesh Nationalist Party (BNP), and its Islamist ally, Jamaat-e-Islami, of orchestrating the murders. A wave of arrests followed. By the time The Economist went to press more than 11,000 people had been rounded up.

In Dhaka theories about the “real reason” the government sprang into action abound. Some cite self-preservation: in May anonymous jihadists published a hit list that included not just secular bloggers and Hindu intellectuals but also the state telecoms minister and one of Sheikh Hasina’s closest aides, whose close ties to India led militants to brand him the “anti-Islam adviser”.

Some believe Sheikh Hasina ordered the arrests to please foreign governments that have complained about Bangladesh’s reluctance to pursue the assassins. Still others see the arrests as a sop to the police, who have been given a lucrative opportunity: the average bribe to spring someone after an arrest is between 8,000 and 20,000 taka ($102-255), while up to 100,000 taka can be extracted from a Jamaat activist. The average policeman’s salary is just $250 a month.

Sticking to the script

The arrests are politically convenient. BNP members say that this week’s dragnet caught more than 2,100 of its activists. The ongoing trial on corruption charges of the party leader, Khaleda Zia, who has twice served as prime minister, has left the BNP reeling. Many believe the government wanted to scoop up what was left of the enfeebled opposition before a verdict in Mrs Zia’s trial, expected in the coming months. Most expect her to be convicted and possibly jailed; many are furious.

A Bangladeshi official says the rising death toll and broadening range of targets made the crackdown “an absolute necessity”. On June 7th a Hindu priest was found dead, nearly beheaded, in south-western Bangladesh, just weeks after an elderly Buddhist monk was hacked to death in the country’s south-east. But in private, senior police officers complain that mass arrests are no substitute for proper investigation.

Of the thousands arrested, only a few hundred at most are believed to be members of militant groups. Few high-ranking figures from Jama’atul Mujahideen Bangladesh or Ansarullah Bangla Team—the two outfits that have claimed most of the murders—have been arrested. Perhaps the police do not know who the leaders are, or where they are hiding. But some Bangladeshis speculate that they are deliberately leaving them alone. Hefazat-e-Islam, a fundamentalist group, has staged huge rallies calling for the murder of atheist bloggers. One of its followers was arrested for the killing of one such blogger, Washiqur Rahman. Yet Mufti Fayezullah, a Hefazat leader, says its activists were not targeted in the crackdown.

Nobody seriously suggests that the government is in league with the terrorists. But it has been slow to deal with the threat, long denying that al-Qaeda and Islamic State were active in Bangladesh, even as followers of both groups claimed credit for murders. Instead, the government has blamed the opposition party.

The ruling party, the Awami League, has allowed its own religious wing, the Olema League, to grow ever bolder. Earlier this year, with Hefazat, it campaigned to defeat a petition calling for the removal of a constitutional provision recognising Islam as the state religion. The challenge took 28 years to wend its way through the legal system; the country’s highest court spent all of two minutes dismissing it. Doubtless the judges did so for sound legal reasons, but had they come to a different decision, they might have been murdered.

Zillur Rahman, an academic in Dhaka, says that the Awami League “wants to be seen as a champion of secularism and a protector of Islam”. It should be possible to be both. On June 14th around 100,000 Muslim clerics in Bangladesh issued a fatwa (Islamic religious edict) ruling the murder of “non-Muslims, minorities and secular activists…forbidden in Islam”. Yet still the government is reluctant to speak up for secularism and tolerance.

India, which almost completely surrounds Bangladesh, will be watching with great interest what happens next. Its border with Bangladesh has traditionally been as calm as its border with Pakistan is restive. It fears instability and radicalism on both sides.

India’s government is also concerned for the safety of Bangladesh’s Hindu population, which has declined markedly in recent years. Many have fled across the border; India has vowed to make it easier for them to claim citizenship. More may follow. Five days into the crackdown, a Hindu college teacher in a town near Dhaka answered the door at his home and was hacked nearly to death by three men with machetes.