A blogger has been hacked to death by three men in Bangladesh's capital Dhaka and two of the attackers were caught near the scene, police said.

The killing took place a month after a prominent Bangladeshi-American blogger known for speaking out against religious extremism was hacked to death in the city.

In the latest incident, Washiqur Rahman Babu, 26, was declared dead at a hospital shortly after being attacked in Dhaka's Tejgaon area, police official Biplob Kumar Sarker said.

Two suspects, both students at Islamic schools, were captured and three meat cleavers were recovered, Mr Sarker said. The third suspect fled, he said.

One of the suspects told reporters they attacked Mr Babu because he had disrespected Islam's Prophet Mohammad.

"I stabbed him because he humiliated my prophet," said Jikrullah, a 20-year-old student at Hathajari Madrassah in the south-eastern district of Chittagong, without elaborating.

Jikrullah said he travelled from Chittagong and stayed overnight at a mosque to attack Mr Babu.

The other detained suspect, Ariful Islam, also 20, is a student at an Islamic school in Dhaka's Mirpur area. They named a third suspect, but details about him were not available.

It was not immediately known what kind of blogging Mr Babu did, but the suspects told police they targeted him for anti-Islamic writings, Mr Sarker said.

The deputy spokesman for the UN secretary-general, Farhan Haq, expressed concern at the latest death.

"We have been calling for the respect of basic rights in Bangladesh, including the right to freedom of expression," he said. "It's a matter of tremendous concern that journalists and other intellectuals have been attacked."

Two of Mr Babu's cousins told reporters at Dhaka Medical College Hospital, where his body was being kept, that he recently joined a travel agency in Dhaka after finishing his studies, and they were not aware of any blogging he had done.

Local media reported that Mr Babu had a Facebook page that contained the line "IamAvijit," meaning he was a follower of Avijit Roy, the Bangladeshi-American blogger who was hacked to death late last month.

Roy, a Bangladesh-born US citizen, died after being attacked at Dhaka University as he was leaving a book fair with his wife.

A previously unknown militant group, Ansar Bangla 7, claimed responsibility for the attack. Detectives have arrested one suspect in the case, and the FBI is helping with the investigation.

Amnesty International has condemned the Bangladeshi authorities’ “utter failure” to protect bloggers in the country after a second blogger in the space of a month was hacked to death.

Abbas Faiz, Bangladesh Researcher at Amnesty International, said, “The killing of Washiqur Rahman today is another clear example of the Bangladeshi government’s utter failure to ensure the safety of those at risk.

“The despicable murder of Avijit Roy last month should have led authorities to step-up protection measures for bloggers and others at risk.

“How many more bloggers will have to be attacked before action is taken?

“Authorities must immediately and thoroughly investigate both killings, ensure those suspected of committing the crimes are brought to justice and ensure meaningful protection for journalists and bloggers at risk of attack.”