An Egyptian administrative court in Cairo ruled Tuesday to uphold the power of the interior minister to deport people accused of homosexuality.

According to a judgement obtained by BuzzFeed News, the case has its roots in the 2008 arrest of a Libyan man who police alleged to be gay in their report. While the court documents leave unclear precisely what he was arrested for — or what charges were brought against the man, who remains anonymous in the judgement — as with many foreign nationals who are arrested in Egypt, the Egyptian government deported him based on this arrest and barred him from reentering the country. He sued to be allowed to return so that he could complete graduate studies at the Arabic Academy for Maritime Transport, arguing that the interior minister did not have the power to block him from the country.

Judge Yahia Dakrory, who issued the ruling, rejected this argument, and said that the interior ministry lawfully used its power to protect "the general benefits, religious values, social morals of society and to prevent the spreading of social ills," according to the ruling.

The ruling comes amidst an ongoing crackdown on LGBT rights by the government of President Abdel Fattah al-Sisi, but the case decided on Tuesday was filed well before he took power with help of the military in 2013. The documents currently available do not make clear when the case was first filed.

It is not immediately clear whether this ruling will have implications beyond this case. It comes following a series of high-profile trials of people on "debauchery" charges accused of homosexuality, which a government official told BuzzFeed News in September was part of an effort by the Sisi government to neutralize attacks by the Muslim Brotherhood on the regime's secular nature.

The most sensational of these cases was the arrest of 26 men at a bathhouse in a working-class Cairo neighborhood in December, allegedly after a journalist claimed to have told police that it was the site of a "gay sex party." But a court dismissed the charges in January, a blow to the morality police which routinely wins convictions on such charges.