Authorities in Egypt are using “abusive” anal examinations they claim can detect “chronic homosexuals” to arrest and imprison gay men.

The government is using discredited scientific theories dating back more than 150 years to conduct the so-called tests, which are common in around 70 countries where sodomy is still illegal.

Human rights activists say 2014 was the worst year in a decade for Egypt's gay community, with at least 150 men arrested or put on trial.

Egyptian authorities ordered the arrest of nine men who appeared in a video purporting to show the country’s first gay marriage (You Tube)

The Justice Ministry’s Forensic Medical Authority governs examinations, where suspects are made to prostrate themselves as if in Muslim prayer so doctors can assess them.

The deputy director of the authority, Dr Maged Louis, told Buzzfeed News that probes were not used and sketched different shapes of anus to support his claims that “chronic homosexuals” could be detected by monitoring contractions and the lack of wrinkles.

“The shape of the hole will change,” he said. The anus “won’t be normal anymore and will look like the female vagina.”

Although there is no law specifically banning homosexuality in Egypt, the offence of habitual debauchery is used to prosecute men suspected of having sex.

Laws governing indecency, explicit images and prostitution are used in other cases.

A gay rights protest in New York calling for Egypt's release of 52 gay men (Reuters)

A Human Rights Watch report called the homosexuality tests “invasive, intrusive, abusive, and profoundly humiliating…a form of torture, carried out in violation of international standards and professional principles”.

The group said the theory was based on “obsolete, nineteenth-century medical mythology” taken from Auguste Ambroise Tardieu’s 1857 work, the Forensic Study of Assaults against Decency.

The French forensic doctor laid out six discredited signs of engagement in gay sex, including sores, fissures and a funnel-shaped anus.

France may have moved on but his theories still govern Egypt’s so-called tests, along with those in several other states once part of foreign empires with anti-homosexuality laws left by Victorian colonialists.

Gay men are known by the derogatory slang term “khawal” in Egypt and live under the fear of public shaming as well as persecution by the authorities.

A message sent to Grindr users in Egypt warned them to hide their identities (Grindr)

In January, an Egyptian court acquitted 26 men arrested in a televised raid last month on a public bathhouse in Cairo.

A pro-government television network had aired humiliating scenes of half-naked man being dragged out of the bathhouse by police in December and the trial was highly publicised.

The defendants’ lawyer accused the police of subjecting the men to an “inhuman” forensic investigation that produced a “vague and incomplete” report that cited “scratches” as indication of possible homosexual activity.

Their acquittal came less than a month after an appeals court reduced prison sentences from three years to one for eight men convicted of “inciting debauchery” for appearing in an alleged same-sex wedding video.

President al-Sisi could be trying to boost his popularity among conservative Muslims (Getty Images)

Prosecutors told police to arrest the men and ordered the coroner to carry out physical examinations of all of the accused with a view to pressing charges against them for "inciting debauchery and spreading images that violate public decency".

Activists claim President Abdel-Fattah el-Sisi is cracking down on the gay community as well as atheists and other minority groups in a wider campaign against all forms of dissent and diversity in the turbulent country.