A gay rights activist in Jamaica, was granted a court hearing on Tuesday, as he hopes to bring a constitutional challenge to the country’s anti-sodomy law.

The law, passed in 1864, bans sex between men. Javed Jaghai, who is an outreach worker for the Jamaica Forum for Lesbians, All-Sexuals and Gays, sought on Tuesday to have his case taken up by the Constitutional Court.

Justice Carol Edwards, overseeing the case, gave the attorney general, named as defendant in the case, until mid-September to file a response to the case, reports the AP.

The law, which is rarely used, bans anal sex, and carries prison sentences of up to ten years in prison and hard labour. Two years in prison can also be given for acts interpreted as “gross indecency” between men.

Busy meetings were held at the weekend by church pastors opposed to overturning the law.

The next hearing is set for early October. The case brought by Jaghai argues that the law increases homophobia, and more than that, violates a charter of human rights adopted in 2011, which guarantees privacy.

The claimant says he was evicted from his apartment on the basis of his sexual orientation, and that discrimination is encouraged by the law.

Speaking to the AP, Jaghai said: “For us to challenge the anti-gay cultural order, it would be necessary for us to become visible and more vocal.

“When [gay people's] sexuality becomes known, the community sometimes turns on them. They must confront the reality each day that who they are could, without notice, spark a riot and they could be on the receiving end of `jungle justice,’” he said in his court filing.