A Bangladeshi law student who posted against Islamism on his Facebook page has been murdered, police said Thursday, the latest in a series of killings of secular activists and bloggers in the country.

Nazimuddin Samad, a 26-year-old atheist who had taken part in protests against Islamist leaders, was attacked late on Wednesday near his university in Dhaka by unknown assailants carrying machetes.

"They hacked his head with a machete. As he fell down, one of them shot him in the head with a pistol from close range. He died on the spot," deputy commissioner of Dhaka Metropolitan Police Syed Nurul Islam told AFP.

"It is a case of targeted killing. But no group has claimed responsibility," Islam said, adding police were investigating whether Samad was murdered for his writing.

Police said the attackers followed Samad home from an evening class on Wednesday before they attacked him on a busy road near Dhaka's Jagannath University, where he was a law student, reportedly shouting Allahu Akbar (God is Greatest).

It was the sixth such killing in 15 months and sparked protests in Dhaka, where more than 1,000 students blocked a busy road to demand the attackers be brought to justice.

"You just can't kill a man just because he is an atheist," one protester shouted.

No one has yet been prosecuted for the murders of four atheist bloggers and a secular publisher hacked to death last year, although police have arrested members of a banned group called the Ansarullah Bangla Team (ABT).

Rights group Amnesty International said Samad's killing was a "blatant attack on the right to freedom of expression", urging Bangladesh to take action to end the violence.

Imran Sarker, who leads Bangladesh's largest online secular activist group, said Samad's name was on a list of 84 atheist campaigners that a hardline Islamist group had sent to the home ministry in 2013.

Samad had joined nationwide protests that year against top Islamist leaders accused of committing war crimes during the country's war of independence, and is the fifth person on the list to be killed.

Story continues

"He was a secular online activist and a loud voice against any social injustice. He was against Islamic fundamentalism," said Sarker, head of the Bangladesh Bloggers Association.

- 'Climate of fear' -

Samad had posted several comments on Facebook criticising radical Islam and mocking hardline Islamists.

In one, he described religion as "the most barbaric invention", while another mocked a hardline Muslim cleric who was recently arrested for raping a young boy.

Samad's childhood friend and fellow activist Gulam Rabbi Chowdhury said he had gone into hiding, although he did not know whether he had received any specific threats.

"When I last met him in February, he told me that he deactivated his Facebook page for a few weeks and left Sylhet city to live in hiding in his village," Chowdhury said.

Another friend, Kawsar Ahmed, said Samad had received anonymous calls on his phone and had been attacked last year, although he did not elaborate.

A Facebook post last August hinted at fears of an attack.

Responding to a friend's request that he continue to write -- even if it meant leaving the country for his safety -- Samad posted, "I'll first save my neck and then I'll invoke Allah's name".

Secular groups have called for nationwide protests and rallies to demand more protection for publishers, bloggers and writers, some of whom have fled the country or gone into hiding.

"The persistent failure of the Bangladeshi government and the international community to ‎better protect threatened thinkers has created a climate of fear and direct threat to free thought in the country," PEN America said in a statement condemning the latest murder.

Samad had only recently arrived in Dhaka from Sylhet to study law.

Deputy police commissioner Islam said the attackers had likely been monitoring him prior to his arrival in Dhaka.

Sylhet police chief Kamrul Ahsan told AFP Samad had not complained of any threats.

Several foreigners have been murdered in recent months in Bangladesh, which has also suffered attacks on minority Sufi and Shiite Muslims.

A long-running political crisis in the majority Sunni Muslim but officially secular country has radicalised opponents of the government and analysts say Islamist extremists pose a growing danger.