Bangladesh police on Sunday announced that they have arrested a man in connection with the murder of Xulhaz Mannan and his friend Tonoy Mahbub.

Mannan, 35, was the editor of Bangladesh's first and only magazine devoted to the LGBT community. A gay rights activist, Mannan also worked for the U.S. Agency for International Development.

The suspect is a 37-year-old man who officials identified as Shariful Islan Shihab.

A gang of six people posed as messengers last month to gain access to Mannan's apartment building and stab the two men to death.

The killings are part of a wave of murders targeting atheists, moderates and foreigners in Bangladesh.

According to the AP, Shihab, who has ties to several militant groups, confessed to taking part in the killings, saying that it was ordered by his group's high command.

Al-Qaida has claimed responsibility for the murders. The group said that the men became targets because they were “practicing and promoting homosexuality in Bangladesh … with the help of their masters, the U.S. crusaders and its Indian allies.”