Image copyright AP Image caption The suspect was identified by police as Shariful Islam Shihab

Police in Bangladesh have arrested a man over the killing last month of a gay rights activist and his friend.

The suspect was identified as Shariful Islam Shihab, a former member of the banned Islamic group Harkatul Jihad.

Xulhaz Mannan, the editor of Bangladesh's first magazine for LGBT people, and fellow activist Mahbub Rabbi Tonoy were killed last month.

Bangladesh has seen a surge in violent attacks against gay activists and other minority groups in recent months.

Few details were given about the arrest of Mr Shihab, 37. Monirul Islam, chief of Dhaka's counterterrorism unit, said the suspect had admitted being involved in the stabbing of the two men, although this was not independently verified.

Mr Islam said police were checking footage of the crime to see if Mr Shihab was visible.

Image caption Victim: Magazine editor Xulhaz Mannan, 35

Image caption Victim: Mahbub Rabbi Tonoy, 25

Mr Mannan, 35, and Mr Tonoy, 25, were hacked to death at a flat in Dhaka. Another person was injured in the attack.

They had been responsible for organising Dhaka's annual "Rainbow Rally", held on Bengali New Year, 14 April, since 2014. This year's rally was banned by police as part of widespread security measures.

The murders happened two days after a university teacher was hacked to death by suspected Islamist militants.

Atheists, moderates and foreigners have been targeted by Islamists in a spate of recent attacks in the capital.

Lurching from secularism to sectarian terror?

Who is behind the Bangladesh killings?

Earlier this month, a Bangladeshi law student who had expressed secular views online died when he was hacked with machetes and then shot in Dhaka.

Last year, four prominent secular bloggers were also killed with machetes.

The four bloggers had all appeared on a list of 84 "atheist bloggers" drawn up by Islamist groups in 2013 and widely circulated.

There have also been attacks on members of religious minorities including Shia, Sufi and Ahmadi Muslims, Christians and Hindus.

Two foreigners - an Italian aid worker and a Japanese farmer - have also been killed.

Muslim-majority Bangladesh is officially secular but critics say the government has failed to properly address the attacks.

Homosexuality is technically illegal in Bangladesh and remains a highly sensitive issue in society.