A Guyana judge's decision has narrowed how police can apply a law that prohibits cross-dressing in the South American country.

The colonial-era law was challenged after police in 2009 arrested several litigants born male but who identify as female as they waited for taxis. The litigants were given minor fines for wearing female clothing, the AP reported.

During their first appearance before a court, a magistrate scolded them for losing their way from Jesus Christ.

Acting Chief Justice Ian Chang said in his Friday ruling that cross-dressing is only a criminal offense if it's done for an “improper purpose” such as prostitution. He said that cross-dressing “for the purpose of expressing or accentuating his or her personal sexual orientation in public” is not criminal. He awarded the litigants compensation because police did not inform them of the reasons for their arrests.

Opponents, who want the law struck down, argue that the law violates Guyana's constitution, which prohibits discrimination on the basis of gender. They said that they would appeal Chang's decision.

“The trans community is very worried and still fearful of arrests in light of this decision,” said Quincy McEwan, director of Guyana Trans United.