The case highlights complaints about discrimination against gays at a time when international rights groups are urging authorities in Muslim-majority Malaysia to abolish laws criminalizing same-sex relations.
The acquittal this week of opposition leader Anwar Ibrahim on charges of sodomizing a male former aide prompted Amnesty International and Human Rights Watch to criticize the Malaysian government for insisting on laws that make sodomy punishable by 20-year prison sentences.
Organizers of a "Sexual Independence" festival held annually in Malaysia since 2008 filed a petition in the High Court in hopes of overturning a ban imposed last year on the relatively low-key event, which was supposed to feature musical performances, talks on sexuality issues and a poster exhibition.
Police ordered activists to scrap the event after Muslim organizations complained it could disrupt public peace. Deputy Prime Minister Muhyiddin Yassin called the festival "inappropriate."
The festival's organizers said in a statement Tuesday that the ban was unconstitutional, adding that attempts "to prevent us from expressing ourselves are irrefutable evidence of the discrimination" against gays and transsexuals.
The Attorney General's office opposed the organizers' petition, saying in a court document seen by the AP that the ban was "not amenable for review."
It added that the rights advocated by the festival were not recognized by the Constitution but were instead "contrary to law and public order."
Government lawyer Noor Hisham Ismail confirmed officials were objecting on those grounds. He declined to elaborate.
The court scheduled a hearing Feb. 21 to decide whether the case was strong enough to merit further proceedings.
Public debate about gay rights in Malaysia has intensified in recent years, partly because some young gay men from the ethnic Malay Muslim majority have drawn criticism from religious conservatives for speaking openly about their sexuality. Religious groups have held demonstrations urging officials to curb what they described as rising cases of homosexuality.
Rights activists say homophobia is evident in many government policies, including the seldom-enforced law against sodomy and censorship rules forbidding movies and song lyrics that promote acceptance of gays.
The High Court acquitted opposition leader Anwar on Monday of sodomizing a 26-year-old man in a case he claimed was politically motivated. Anwar last week told the AP he considers the anti-sodomy law archaic and easily abused to breed intolerance and invade people's privacy.
Amnesty International on Monday called Malaysia's law against sodomy "repressive," while Human Rights Watch said it had "no place in (a) modern, progressive democracy."