Dhaka: Bangladesh's first gay magazine editor was brutally murdered tonight along with a friend in his flat here by suspected Islamists, in the latest audacious attack on high-profile bloggers and intellectuals in the Muslim-majority country.

Julhash Mannan, the editor of 'Roopban' - the only magazine in Bangladesh advocating gay rights - and his friend Tanay Fahim were killed by armed assailants who entered the flat impersonating as courier company officials, Deputy commissioner of Ramna division police Abdul Baten said.

Mannan, 35, a cousin of former foreign minister Dipu Moni and ex-protocol officer of the US embassy, was known for his gay rights activism.

Tanay, the other victim, was also a LGBT activist.

"Three persons came this evening and claimed they had a courier for Mannan. When I went up and told him (Mannan) this, he said that he was not expecting any such parcel," said Parvez Mollah, a security guard of the building in Kalabagan.

"As I came down and told them this, they insisted that I allow them to meet him (Mannan)," Mollah said.

When the guard objected, they stabbed him leaving him injured in the left eye and left arm.

The assailants then rushed to Mannan's flat on the second floor and stabbed him and his friend indiscriminately, Abdul Bari, a sub-inspector of Special Branch (SB) of police, was quoted as saying by the Daily Star.

The two died immediately on the spot.

Mannan's body was found lying at the entrance of the house while Tanay’s body was found inside.

The killings came two days after the grisly murder of liberal university professor Rezaul Karim Siddiquee in the northern Rajshahi city. The attack was claimed by the ISIS.