Revolutionary guards raid hall in city of Kermanshah where group was dancing, taking away at least 17 people

Iran's revolutionary guards have announced the arrest of "a network of homosexuals and satanists" in the western city of Kermanshah, close to the country's border with Iraq, prompting fresh alarm over the treatment of gay people in the Islamic republic.

The news website of the revolutionary guards in Kermanshah province, home to the country's Kurd ethnic minority, reported on Thursday that their elite forces had dismantled what it claimed to be a network of homosexuals and devil-worshippers.

A number of foreign nationals, including Iraqis, were also among those detained, the report said, adding that eight of the group were married to each other.

The group were picked up from one of the city's ceremony halls, which they had rented for a birthday party. The guards' webiste said they were dancing as the raid ensued.

The revolutionary guards claimed the group had been under surveillance for some time but did not specify how many people were arrested.

Authorities in the Islamic republic have previously likened homosexuals to satanists in an apparent attempt to further smear them in the eyes of the country's religious conservatives.

The Guardian has been informed that the raid took place on Tuesday night when some 80 people, including both straight and gay Iranians, had gathered for a birthday party in Kermanshah. At least 17 people who had tattoos, make-up, or were wearing rainbow bracelets were blindfolded and taken to an unknown location, according to a local source. Partygoers were filmed by the elite forces and had their mobile phones confiscated.

Lesbian, gay, bisexual and transgender (LGBT) people in Iran face serious persecution both from the ruling system and broader society, especially by hardline conservatives. Some risk horrific punishments, including the death penalty and heavy jail sentences, others are bulllied and forced into exile.

Official treatment of gay people varies dramatically depending on where they are arrested and who by. Those arrested in provincial cities like in Kermanshah, are usually under more pressure.

Until recently same-sex sodomy was punishable by death but a new amendment to the penal code, approved in 2012, has brought new changes. Under the new penal code, in effect, the person who played an active role will be flogged 100 times if the sex was consensual and he was not married, but the one who played a passive role will still be put to death regardless of his marriage status. Punishment for mosahegheh (lesbianism) is 100 lashes for all individuals involved, but it can lead to the death penalty if the act is repeated four times.

In recent years, it appears that the government and the police has maintained the policy of ignoring gay people but the revolutionary guards and the informal voluntary Basij religious militia, who are indepdent of the government but close to the country's supreme leader Ayatollah Ali Khamenei, have been active tracking down gays and punishing them.

Despite the punishment, Iran's LGBT community have been struggling for recognition in recent years with many active online, publishing their works or simply sharing their experience. An increasing number of Iranian gay people also appear to be coming out to their friends and family.

Unlike homosexuality, which is punishable by death, transsexuality in Iran has been legal since a fatwa was issued in 1987 by the late Ayatollah Ruhollah Khomeini on their behalf. Although transsexuality is legal, the social stigma means that they can have an even worse life than gay people.

In September 2007, Iran's former president Mahmoud Ahmadinejad famously denied homosexuals existed in the Islamic republic. "In Iran we don't have homosexuals like in your country," he told a jeering audience at Columbia University in New York during his UN visit.

Back home, Siamak Ghaderi, a journalist working for the state news agency, Irna, proved him wrong by publishing a series of interviews with the country's homosexuals but was later arrested and sentenced to jail. He is currently in prison serving a four year prison term for "insulting the president" and "spreading propaganda against the regime", and was reportedly lashed 60 times in 2012.