Get breaking news alerts and special reports. The news and stories that matter, delivered weekday mornings.

DHAKA — Bangladeshis gathered on Sunday to pay tribute to an American blogger and critic of religious extremism who was hacked to death in Dhaka, in the latest of a series of attacks on writers in the predominantly Muslim nation.

Avijit Roy, an engineer of Bangladeshi origin, was killed by machete-wielding assailants on Thursday while returning from a book fair.

His wife and fellow blogger Rafida Ahmed suffered head injuries and lost a finger. She remains in hospital in a serious condition.

The attack came amid a crackdown on hardline Islamist groups, which have increased activities in recent years to turn the secular South Asian nation of 160 million people into a Sharia-based country.

Mourners gathered with flowers on Sunday to pay their respects to Avijit, who was in his native city on a visit from the United States.

Students, professors and writers were among those laying flowers on Avijit's coffin, placed in the grounds of Dhaka University.

Let our news meet your inbox. The news and stories that matters, delivered weekday mornings. This site is protected by recaptcha

"Free thinking in Bangladesh is becoming a great danger, all the free thinkers are at great risk," writer Shahriar Kabir said.

"We want to know why the government failed to ensure the safety of him, despite knowing that he had been facing threats from the Islamist radicals."

No arrests have been made. A demonstration was also held at the spot where Avijit was killed. Protesters chanted slogans demanding the "immediate arrest and quick trial of the perpetrators."

Avijit's family said Islamist radicals had been threatening him because he kept a blog, "Mukto-mona," or "Freemind," which highlighted humanist and rationalist ideas and condemned religious extremism.

"Islamist radicals are behind the murder. The fundamentalists were threatening to kill him," Avijit's father Ajoy Roy said at the gathering.

U.S. State Department spokeswoman Jen Psaki called it "a shocking act of violence" that was "horrific in its brutality and cowardice."

The United States was ready to assist the investigation, Psaki told a regular news briefing on Friday.

Bangladesh's Foreign Minister Abul Hassan Mahmood Ali said he shared with a group of Dhaka-based diplomats on Sunday "the Government’s decision to positively respond to the U.S.’ offer to engage the FBI in unearthing the motive and real culprits behind the murder."

Avijit's killing follows a string of similar attacks in recent years. In 2013, religious militants targeted several secular bloggers who had demanded capital punishment for Islamist leaders convicted of war crimes during Bangladesh's war for independence.

Blogger Ahmed Rajib Haider was killed that year near his home in Dhaka after he led one such protest.

In 2004, Humayun Azad, a secular writer and professor at Dhaka University, was also attacked by militants while returning home from a Dhaka book fair. He later died in Germany while undergoing treatment.

Media group Reporters Without Borders rated Bangladesh 146th among 180 countries in a ranking of press freedom last year.

Bangladeshi social activists participate in a rally to protest against the killing of Avijit Roy, a prominent Bangladeshi-American blogger in Dhaka, Bangladesh, Sunday, March 1, 2015. Roy, known for speaking out against religious extremism was hacked to death Thursday night as he walked through Bangladesh's capital with his wife, police said Friday. Suvra Kanti Das / AP

— Reuters