Image copyright Other Image caption Niloy Neel was an atheist from a Hindu background

A Bangladeshi blogger known for his atheist views has been hacked to death by a gang armed with machetes in the capital Dhaka, police say.

Niloy Neel was attacked at his home in the city's Goran area.

He is the fourth secularist blogger to have been killed this year by suspected Islamist militants in Bangladesh.

Imran H Sarkar, head of the Bangladesh Blogger and Activist Network, told the BBC that Mr Neel had been an anti-extremist voice of reason.

"He was the voice against fundamentalism and extremism and was even a voice for minority rights - especially women's rights and the rights of indigenous people," he said.

BBC World Service South Asia editor Charles Haviland says that, like previous victims, Mr Neel was not only secular but atheist and, like two of the others, he was from a Hindu, not a Muslim, background.

Media playback is unsupported on your device Media caption Arif Rahman says the government should do more to protect bloggers

Analysis: Mukul Devichand, editor, BBC Trending

All four men killed were on a list of 84 "atheist bloggers" drawn up by Islamic groups in 2013 and widely circulated.

It was originally submitted to the government with the aim of having the bloggers arrested and tried for blasphemy. The groups which wanted bloggers arrested told us they have no knowledge of who is behind the killings.

There is also a more complex backdrop to the killings. Islamic groups label all these bloggers "atheists" - and many did indeed use the internet to criticise those who believe in God.

But in fact, not all the bloggers were atheists. What they did have in common was they were part of a wider, secular movement that took to the streets in protest in 2013.

'Nowhere is safe': Behind the blogger killings

BBC World Service: Bangladesh's murdered bloggers

The BBC's Akbar Hossain in Dhaka says Mr Neel had filed a police report expressing fear for his life, but his complaints had not been not followed up.

Police said about six attackers had tricked their way into Mr Neel's home by saying they were looking to rent a flat.

"Two of them then took him to a room and then slaughtered him there," deputy police commissioner Muntashirul Islam said.

"His wife was in the flat but she was confined to another room."

Image copyright Getty Images Image caption The killing of blogger Avijit Roy in February triggered protests in Bangladesh

In May, secular blogger Ananta Bijoy Das was killed by masked men with machetes in Sylhet. He was said to have received death threats from Islamist extremists.

In March, another blogger, Washiqur Rahman, was hacked to death in Dhaka. Blogger Avijit Roy, who courted controversy by championing atheism and also tackling issues such as homosexuality, was killed in Dhaka in February.

Bangladesh is officially secular but critics say the government is indifferent to attacks on bloggers by Islamist militants.

Two people have been arrested, but no-one charged, in connection with this year's killings, our correspondent adds.