DHAKA (AFP) - Bangladesh police on Monday (Feb 20) detained an Islamist who had been sentenced to death in his absence in 2015 for planning the gruesome murder of a secular blogger.

Police said they had caught Rezwanul Azad Rana, a 34-year-old former student at one of the country's top universities, and one other man when they raided a house in a suburb of Dhaka.

Rana had been on the run since the start of his trial for the murder of blogger Ahmed Rajib Haider, who was hacked to death with machetes in February 2013 in the first of a string of attacks targeting secular writers in Bangladesh.

"The counter-terrorism and transnational crime unit of police has arrested Rana along with an assistant militant named Ashraf during a raid from a house at Uttara suburb in the capital Dhaka," said a statement on the Dhaka police website.

It gave no further details of Ashraf's identity.

Rana was convicted and sentenced to death in December 2015 along with another former student at North South University, Faisal bin Nayem, who is in custody.

Police said Haider had angered his attackers by writing against Islam and allegedly mocking the Prophet Mohammed on blog sites.

Bangladesh has suffered a spate of attacks on secular activists, foreigners and religious minorities in recent years.

Last year 22 people were killed, most of them foreigners, when Islamist attackers besieged a popular Dhaka cafe.

Al-Qaeda and the Islamic State in Iraq and Syria group have claimed responsibility for several of the attacks, but Prime Minister Sheikh Hasina's secular government has pinned the blame on local extremists.

Since the cafe attack security forces have launched a deadly crackdown on Islamist extremists, killing around 50.