A court in Egypt has sentenced four men to eight years in prison using a British Mandate-era law banning "debauchery" on Monday.

The court said the men had "committed homosexual acts" and that they were found in women's clothing and makeup when police arrested them. An activist who works with the city's LGBTQ community said the men had attended a party in an apartment hatdoubled as a meeting point for their community when they were arrested.

"Police have been increasingly targeting us in areas in which we were previous safe," said Ahmed, who asked to be quoted only by his first name due to fears over his own safety. "These areas that we could previously go to and gather and police would turn the other way, now they are coming to arrest us there."

Those areas range from apartments in private buildings, to offices known as spas or health centers, which are often little more than a set of rooms with a hot tub.

The men who were sentenced on Monday were arrested in a private apartment in Nasr city within the last month, although Egyptian activists and court papers did not list an exact date of arrest.

"There have been nearly a dozen cases of arrest in the last few months and we aren't sure when this arrest happened," said Ahmed. "There are arrests we don't even hear about, it seems police are actively searching for gay men to arrest."

Men who are arrested in Egypt and accused of homosexuality are often forced to undergo brutally intrusive medical tests to establish if they are "habitual" gays. Human rights groups, including Amnesty International and Human Rights Groups have condemned the practice as abusive.

Since the uprising in Egypt swept away the Mubarak regime three years ago, things have gone from bad to worse for Egypt's LGBT community. Between 2001 and 2004, Hosni Mubarak's regime launched a crackdown on homosexual conduct, arresting and torturing thousands of people.

Following the revolution in 2011 and the ascension of the Islamist Muslim Brotherhood to power, even stricter laws and conditions were placed on the LGBT community.

Brotherhood leaders preached against homosexuality and publicly announced that "gay men are not real people."

In August 2012, Egyptian police arrested a man for leading a "gay sex network," and later that year vigilantes beat and detained four young men who they alleged were having sex in a car. The vigilantes were let go, and the four young men arrested.

Some briefly hoped that the fall of the Muslim Brotherhood and arrest of its leaders would allow a loosening of restrictions on Cairo's LGBT community.

Instead, a series of arrests have shaken the community. In October of last year, a group of 14 men were arrested in the Cairo suburb of al Marg in a highly publicized incident.

Egyptian media gleefully reported that the men had been involved in "homosexual" acts at the center, which the news reports alternatively described as a health spa and medical building, and that various illegal pills and stimulants had been found in the men's possession.

"Information had been received about the center's illegal activity, and that it welcomed perverted men and boys to practice immorality in its rooms. The investigation has proved the information correct; the center was raided, and 14 men were caught, in positions that are against religious precepts," reported the State-run Akhbar el-Youm newspaper. "Also, the management staff were caught along with a large quantity of pills and sexual stimulants. It emerged that the center only engages in this illegal activity in return for payments of between 50 and 200 pounds [$7–$28] for one encounter."

Scott Long, a visiting fellow in the Human Rights Program of Harvard and former executive director of the LGBT Program at Human Rights Watch, wrote on his blog that such arrests were a worrying trend as Egyptian police try to salvage their credibility at the moment and ride the high tide of Egyptian nationalism and pride in the army.

"Since the coup, the police go after Syrians, Palestinians, and other foreigners, because the wave of State-fostered xenophobia makes them applause-inducing targets," Long wrote. "But it never hurts to announce that you've picked up a few suspected homosexuals. What better paints you, corrupt and immoral though you may be, as a defender of the nation's morals?"