Kenya's High Court has ordered the government to register a gay rights group that the government had earlier refused to recognize on moral and religious grounds.

The court said Monday that the Kenyan constitution recognizes and protects the rights of minorities and does not allow limitations on moral grounds.

"In Kenya, the constitution is supreme," the three judge panel said. "The state has to act within the confines of what the law allows and cannot rely on religious texts or its views of what the moral and religious convictions of Kenyans are to justify the limitation of a right."

The judgment followed a petition by a Kenyan activist, Eric Gitari, to register a non-governmental organization whose objective was to protect the human rights of gays and lesbians. Gitari took his case to court in September 2013 after a government board rejected his application.

Some Kenyan lawmakers say they want to pass a motion to compel authorities to more strongly enforce the country's anti-homosexual laws.

In neighboring Uganda, the government recently passed a law in defiance of Western pressure to criminalize homosexual acts with a life sentence. The Ugandan Supreme Court overruled the measure based on a technicality, saying the bill passed in parliament without enough members present for a quorum. Government officials say they will make another attempt to crack down on homosexuality.