US Secretary of State John Kerry has condemned the "barbaric murder" of Julhash Mannan, the editor of a gay rights magazine, who also worked with the US embassy in Bangladesh.

"The men and women of the US State Department join me today in condemning the barbaric murder of Mannan," Kerry said in a statement on Monday. "We are profoundly saddened by the loss of one of our own in such a senseless act of violence, and we extend our deepest condolences to his family and loved ones," he said.

Mannan, 35, the editor of Roopban - the only magazine in Bangladesh advocating gay rights, and his friend Tanay Fahim were murdered at Mannan's flat in Dhaka's Kalabagan on Monday. He was an ex-protocol officer of the US embassy and a cousin of former Bangladesh foreign minister Dipu Moni.

Also read US outraged at murder of LGBT magazine editor in Bangladesh

Mannan was a "trusted colleague, a beloved friend, and advocate for human rights and dignity in Bangladesh. In many ways, he embodied the spirit of the people of Bangladesh and the pride with which they guard their traditions of tolerance, peace, and diversity," Kerry said.

Offering full support to the government of Bangladesh in bringing the perpetrators to justice, he said the US remains committed to the principles that were so important to Mannan. "We promise to support all those who work on behalf of tolerance and human rights in Bangladesh and around the world," he said.

Mannan first joined the US Embassy in Bangladesh as a Protocol Specialist, serving for eight years in that capacity before joining USAID in September 2015. USAID Administrator Gayle Smith also condemned the killings, terming it a "cruel and inhumane" act of violence.

Mannan was the kind of person willing to fight for what he believed in, someone ready to stand up for his own rights and the rights of others, he said. A dedicated and courageous advocate for human rights, he sought to shape a society that was more diverse and inclusive.

Also read US condemns barbaric murder of blogger Nazimuddin Samad in Bangladesh

He believed in the people of Bangladesh, and he strove to make the world a better place for everyone, Smith added. The US state department spokesperson John Kirby also expressed outrage over the killings. "We're outraged by the barbaric attack," Kirby said.

In a statement, the Committee to Protect Journalists also condemned the murder and critiqued the Bangladesh government for "doing little" to ensure safety of at-risk groups. "Authorities must immediately investigate the murder, and bring the perpetrators to justice," said Bob Dietz, CPJ's Asia program coordinator. "Journalists and intellectuals are under attack in Bangladesh and the government has done little to end the murderous mayhem or to ensure the safety of at-risk groups," he said.

There have been systematic assaults in Bangladesh in recent months specially targeting minorities, secular bloggers, intellectuals and foreigners.