There is an eerie feeling out on the streets of Bangladesh. To some of the city’s academics, activists and gay community, Dhaka now feels more dangerous than a war zone, after a spate of machete attacks by Islamist groups, including the murder last week of the founder of Bangladesh’s first magazine for the gay community.

At least 16 people have died in such attacks in the past three years, among them six secular bloggers, two university professors, an Italian priest, two other foreigners working in the development sector, and a prominent gay activist.

On Saturday a Hindu man, Nikhil Joarder, was hacked to death in the district of Tangail, central Bangladesh, with police suggesting his killing might be connected to a 2012 complaint claiming that he had made comments against the prophet Muhammad.

If Bangladesh lets zealots extinguish its brightest minds, it is no democracy | Raad Rahman Read more

Other targets have included high-profile cultural and intellectual figures, but also very private individuals, apparently murdered simply because Islamists objected to their lifestyle. The diversity of the victims, and the authorities’ sluggish response to the killing spree, have spread fear among anyone who identifies with those who have been killed.

“I am more worried now here than I ever was in Afghanistan, where the threats were more of an existential nature,” says a gay American who has spent time in the war-torn country and now lives in Bangladesh. He asked not to be named.

Among his friends to have died were Xulhaz Mannan, a prominent activist – founder of Roopbaan, the country’s only magazine for the lesbian, gay, bisexual and transgender community – and Mannan’s friend, Mahbub Rabbi Tonoy. Six to seven assailants pretending to be from a courier company forced their way into Mannan’s apartment and hacked the two men to death last week.

Homosexuality is illegal in Bangladesh and many members of the gay community were already living in fear of being identified. Now they also have to fear for their lives – and the murders have in effect outed many young people by forcing them to change their daily routine.

“The news of Xulhaz and Tonoy’s deaths has exposed many young gays and lesbians to their families before they were ready,” says a close friend of Mannan’s, who lives in the US and also did not want to be named. “I know of people not going to work for seven days, who have no hope of going back now.”

Shockwaves from the killings went far beyond the gay or activist communities, reaching diplomatic and development workers. Mannan was a former employee of the US embassy and before his death worked at the US government’s development agency USAid.

“They [militants] are really trying to get attention by striking against the people whose deaths would get [wide publicity],” says another US expatriate from within the gay community. “It makes me think twice about certain things,” he told the Observer.The attackers are also striking at Bangladeshi cultural and intellectual life far beyond the capital. Two days before Mannan and Tonoy were killed, two men on a motorbike drew up to a bus stop in the northwestern city of Rajshahi and hacked Rezaul Karim Siddique to death. Islamic State said that he had been killed for “calling to atheism”.

Siddique was an English professor at Rajshahi University, a musician and a devout Muslim who had no political affiliation. An aficionado of the sitar, he donated to the mosque in his home village and had helped students at its madrasa, or religious school, according to Muhammad Shahiduzzaman, a professor of international relations at the University of Dhaka.

“Anybody could become a target,” Shahiduzzaman says.

Many of those now living in fear think that this was exactly the intention of the killers. Five grisly murders within a month have had a chilling effect across Bangladeshi society. “I have had to cut down on my presence in the civil liberty protests. It was not this frightening even a few days ago,” says Imran H Sarkar, the leader of secular activist group Ganajagaran Mancha.

Facebook Twitter Pinterest Activist Mahbub Rabbi Tonoy was killed alongside a friend in a homophobic attack. Photograph: REX/Shutterstock/Rex/Shutterstock

Responsibility for all of the attacks has been claimed either by Islamic State or Ansar al-Islam, a chapter of al-Qaida in the subcontinent, but Bangladeshi authorities have denied the existence of international jihadi groups in the country. They say the attacks are being carried out by homegrown militants with links to the main opposition party, who are seeking to destabilise the government.

Regardless of who is behind the killings, they are a worrying sign of weakening political and security institutions, in a country of 160 million that until now has proved relatively successful in battling extremism.

Bangladesh’s majority Bengali Muslim population has historically had relatively liberal values, says Afsan Chowdhury, a political analyst, but those traditions are now under threat. “Islamic militancy has been growing for the last 10 to 15 years as political institutions have weakened,” he adds.

Bangladesh's pluralism is at risk if Sheikh Hasina does not stop extremists Read more

After the prime minister, Sheikh Hasina, held on to power in a 2014 election boycotted by the main opposition Bangladesh Nationalist party and its allies, authorities arrested senior opposition leaders on charges of instigating violence.

“The government has very effectively punished the opposition to the point they are not really a political force any more,” says Chowdhury. The vacuum of a strong opposition has made the atmosphere unpredictable.

The spate of killings started in February 2013 after activists demanded that the government hang everyone convicted of collaborating with the Pakistan army during the country’s war of independence from Pakistan in 1971.

Many of those brought to trial, in proceedings widely criticised by human rights groups for not meeting international standards, were linked to the opposition and its Islamist allies. One Islamist group, Hefazat-e-Islam, responded by drawing up a list of 84 atheist bloggers and demanding that the government take action against them for publishing blasphemous content online. At least five of the victims since 2013 were named on that list.

But there has been little official support for others who appear on it, and families of victims and those at risk fear police investigations are too slow and ineffective. So far at least 46 people have been arrested, but only two have been found guilty; they were given the death penalty for their role in the killing of the blogger Ahmed Rajib Haider.

“An arrest is not an assurance of justice,” said Sarkar, the secular campaigner.

There is also frustration that some killers of Avijit Roy, a murdered American blogger of Bangladeshi origin, have been able to escape the country.

Concerns about security are mounting from international quarters after the killing of Mannan. “The government will try to hunt down possible suspects [in Mannan’s killing] but whether they can really get at the actual culprit, there is a great deal of doubt,” Shahiduzzaman told the Observer.

Survivors feel forgotten. Asha Mone’s husband, the blogger Niladry Chattopadhya, was hacked to death in front of her, but police have not contacted her in five months, she told the Observer. Officers said they had arrested five suspects in relation to the case.

Many are also concerned that authorities who should be chasing the killers are instead blaming the victims. They point to a statement by Bangladesh’s police chief after the killing of Mannan, asking citizens to be aware of their security, and other comments by officials blaming blogger victims for writing about religion. “What upsets me most is how [the] government is now going out of their way to find other motives behind the murder,” says Mannan’s friend who lives in the US.

Even if the authorities do step up efforts to find and prosecute the killers, the fear that has been created will linger.

“I walk in the park every morning, and today a man came towards me carrying a knife. When he walked past me, I turned my head so I could check he was walking away,” says a gay expatriate living in the diplomats’ area of Dhaka.

He could not shake off his fear, even when he later found out that the man was there to cut the grass.