The attack Thursday night on Avijit Roy, a Bangladesh-born U.S. citizen, occurred on a crowded sidewalk as he and his wife, Rafida Ahmed, were returning from a book fair at Dhaka University. Ahmed, who is also a blogger, was seriously injured. It was the latest in a series of attacks on secular writers in Bangladesh in recent years.
A previously unknown militant group, Ansar Bangla 7, claimed responsibility for the attack, Assistant Police Commissioner S.M. Shibly Noman told the Prothom Alo newspaper.
Roy "was the target because of his crime against Islam," the group said on Twitter.
Roy was a prominent voice against religious intolerance, and his family and friends say he had been threatened for his writings.
About 8:45 p.m. Thursday, a group of men ambushed the couple as they walked toward a roadside tea stall, with at least two of the attackers hitting them with meat cleavers, police Chief Sirajul Islam said. The attackers then ran away, disappearing into the crowds.
Two blood-stained cleavers were found after the attack, he said.
Islamic extremism has made few inroads in Bangladesh, a Muslim-majority nation of 160 million people, but there have been a series of similar attacks in recent years blamed on militants.
A divide has become increasingly visible between secular bloggers and conservative Islamic groups, often covertly connected with Islamist parties, with the secularists urging authorities to ban religion-based politics while the Islamists press for blasphemy laws to protect their faith.
Islam is Bangladesh's state religion but the country is governed by secular laws based on British common law, and Prime Minister Sheikh Hasina has repeatedly said she will not give in to religious extremism.
Roy had founded a popular Bengali-language blog, Mukto-mona, or Free Mind, which featured articles on scientific reasoning and religion.
The website has apparently been shut down since the attack, but Roy defended atheism in a January posting on Facebook, calling it "a rational concept to oppose any unscientific and irrational belief."
Anujit Roy, his younger brother, said Roy had returned to the country earlier this month from the U.S. and was planning to go back in March.
In 2013, another blogger, Ahmed Rajib Haider, who also spoke out against religious extremism, was killed by still-unidentified assailants near his Dhaka home. In 2004, Humayun Azad, a prominent writer and teacher at Dhaka University, was seriously injured in an attack when he was returning from the same book fair.
Baki Billah, a friend of Roy and a blogger, told Independent TV that Roy had been threatened earlier by people upset at his writing.
"He was a free thinker. He was a Hindu but he was not only a strong voice against Islamic fanatics but also equally against other religious fanatics," Billah said.
"We are saddened. We don't know what the government will do to find the killers. We want justice," he said.
Copyright 2015 The Associated Press. All rights reserved. This material may not be published, broadcast, rewritten or redistributed.