Dhaka: Eight Islamist extremists from a banned group were charged by Bangladesh police on Sunday for the 2016 murders of two prominent gay rights activists.

The Dhaka police's counter terrorism unit filed the charge-sheet against the eight men, saying they were members of Ansar al Islam, said Deputy Commissioner of Police Mohibul Islam Khan told AFP.

"Among them four have been arrested and the rest are still at large," he said, adding the group was led by Syed Ziaul Haque, a sacked Bangladesh army major who was leading the extremist group.

Xulhaz Mannan, publisher of Bangladesh's first magazine for the gay and lesbian community, and fellow activist Mahbub Tonoy were hacked to death in a Dhaka apartment in April 2016 by unidentified men carrying machetes and guns.

Al-Qaeda in the Indian Subcontinent (AQIS) said it was behind the killings of the men, both aged 35, who it said had worked to "promote homosexuality" in Bangladesh.

But Bangladesh police chiefs have said their murders bear the hallmarks of local Islamists, denying that international jihadist networks have a presence in the world's third largest Muslim-majority country.

Ansar al Islam — also known as Ansarullah Bangla Team — has been blamed for a series of murders since 2013, including of atheist writers, publishers, members of religious minorities, social activists and foreign aid workers.

Washington had condemned the killings of Tonoy and Mannan, who worked for US government aid organisation USAID. Both men had received threats from Islamists over their championing of gay rights.

Bangladesh launched a crackdown on Islamist extremism after attacks in July 2016, when IS-inspired militants stormed a Dhaka cafe killing 22 people, including 18 foreigners.

Since the 2016 attacks, security forces have staged nationwide raids in which, they say, nearly 100 members of two extremist Islamist groups have been killed. Hundreds of suspects have been detained.

The South Asian nation has also boosted security since April 21 Easter Sunday bombings in Sri Lanka, which killed 258 and were carried out by jihadists affiliated to the Islamic State group.