Police have detained dozens of gay and transsexual people in Azerbaijan following a number of raids around Baku, with reports of torture and beatings, local LGBT activists have reported.

It's unclear what prompted the roundup, or how many people have been affected. Lawyers working on the cases say that at least 100 people have been detained over a period of several days.

"Suddenly, without any clear reasons to us, police officers of the Ministry of Internal Affairs organized raids against gay and transsexual people,” said Javid Nabiyev, the president of the Nefes LGBT Azerbaijan Alliance, in a video message published on September 22.

Nabiyev said that the raids took place in private homes and public places where gay people are known to congregate. Some of those detained have been forced to inform on their friends. Family members and lawyers have been denied access to the detainees.

The Sweden-based human rights group Civil Rights Defenders spoke to several activists in Baku on condition of anonymity.

"Activists report that the detainees were subjected to beatings, verbal abuse, and forced medical examinations, as well as transsexual women’s heads being forcibly shaven," the group said in a statement. "Many were released only after giving up the addresses of fellow members of the LGBTI community, who were then in turn arrested and subjected to the same treatment. An undetermined number of those detained have been sentenced to either 20 or 30 days of administrative detention."

Police have said that the detentions are unrelated to the sexual orientation of the detainees and accuse them of being engaged in prostitution.

According to official statements, police officers detained people after receiving complaints of prostitution. The statements say the measures were taken in full accordance with Azerbaijani law.

“In our country, sexual minorities have never been persecuted” a representative of Azerbaijan’s Ministry of Internal Affairs told the Caucasian Knot news outlet. “However, this does not mean they are above the law.”

The spokesperson claims “people of non-traditional sexual orientation” were gathered in the center of Baku to engage in prostitution. “Citizens repeatedly appealed to the police with a request to stop these illegal actions. In connection with this, the police have taken measures” he added.

Human rights groups say the police are pushing a media narrative, stating that all those arrested had AIDS and other STDs. “Defending these creatures who are sources of immorality, dangerous diseases, and who have been cursed by God, Western circles are trying to destroy our national traditions under the name of 'human rights,'” said Ayaz Efendiyev, deputy chairman of the minor Justice Party.

The early reporting on the incident recalls Azerbaijan's neighbor to the north, Chechnya, which in recent months has also carried out raids and arrests of gay people, in some cases torturing and murdering the detainees.

Azerbaijan has a notoriously poor record on LGBTI issues. The country was recently ranked the worst place to live in Europe as an LGBTI citizen by a leading rights group.

The ILGA-Europe Rainbow Index, published last year, ranks 49 European countries according to the laws, policies and practices that affect LGBTI communities. Azerbaijan met just five percent of the organization’s criteria for legal equality.

Although homosexuality was legalized in Azerbaijan in 2001, the country has consistently failed to protect its LGBTI community from hate crime and discrimination.

In 2014, a gay couple in Azerbaijan were forced to flee to Turkey after their personal details were published online by local news outlets. The couple received death threats and the pressure of persecution caused them to separate.

The same year, Isa Shakhmarli, a leading LGBTI activist killed himself while draped in the rainbow flag. He left behind a video in which he said: “I tried to explain that love is love as much as I could but my family and friends never understood.”

State authorities have also been involved in repression. In 2009 a novel about a gay love story between an Azeri and Armenian was ordered to be removed from sale by the police, and a panel discussion including the author was cancelled due to public threats and intimidation.

The EU Parliament passed a resolution on Azerbaijan in 2015, condemning its treatment of human rights defenders and said it was extremely concerned over the situation of LGBTI people.