Kampala - Ugandan activists opened a petition on Wednesday at the constitutional court seeking to overturn tough anti-gay laws that have been condemned by rights groups as draconian.
Signed by Uganda's veteran President Yoweri Museveni in February, the law calls for homosexuals to be jailed for life, outlaws the promotion of homosexuality and obliges Ugandans to denounce gays to the authorities.
But the activists argue that the law was passed in parliament without the necessary quorum of lawmakers.
The nine petitioners also claim that the law violates the constitutional right to privacy and dignity, as well as the right to be free from discrimination, and cruel, inhuman and degrading treatment.
"I have a very good feeling about it", the group's lawyer Nicholas Opio said after the hearing in a crowded courtroom.
He said that if the judges decide the law was not correctly passed by parliament, "the entire act will collapse".
Rights groups say the law has triggered a sharp increase in arrests and assaults of members of the country's lesbian, gay, bisexual and transgender (LGBT) community.
Western nations have also made a raft of aid cuts to Uganda in protest since the law was passed.
The activists are led by Civil Society Coalition on Human Rights and Constitutional Law which includes 50 Ugandan groups.
But outspoken anti-gay preacher Pastor Martin Ssempa, who was in court, defended the law and warned against the "abortion of our bill" due to international pressure.
"Our members of parliament were right in passing this law", Ssempa said. "It is really a question between the civilised and the barbarians."
US Secretary of State John Kerry has likened the Ugandan law to anti-Semitic legislation in Nazi Germany.
Opposition leader Kizza Besigye has accused the government of using the issue of homosexuality to divert attention from domestic problems such as corruption scandals or Kampala's military backing of South Sudan's government against rebel forces.
But homophobia is widespread in Uganda, where American-style evangelical Christianity is on the rise.
Gay men and women face frequent harassment and threats of violence.