Kenya’s High Court has ruled that the government can no longer block LGBT groups from formally registering their organisations.

A pro-gay group in the country, the National Gay and Lesbian Human Rights Commission, has fought a long-running legal battle after being blocked from registering as an NGO – leaving them without a number of legal protections.

The NGLHRC has had its application to register as an NGO blocked five times since 2012 – with a Non-Governmental Organizations Coordination Board finding that the name of the organisation was “unacceptable” as the Kenyan Penal Code criminalises “gay and lesbian liaisons”.

However, the High Court set a ground-breaking precedent in a ruling today, which found that the groups should be permitted – and that popular morality and religion should not be basis for limiting rights in Kenya.

The panel of three judges found that blocking such groups violated Article 36 of the country’s Constitution, which provides Freedom of Association.

Téa Braun, Legal Director of the Human Dignity Trust, said: “This is a decisive victory for human rights and the rule of law. Freedom of association is a basic right we all share and to deny some people the right to organise, advocate and discuss issues of common concern simply because they are gay or lesbian is an affront to their dignity.

“We congratulate Kenya’s defenders of human rights on their victory.”

Eric Gitari of NGLHRC said: “This judgement from the constitutional court is ground breaking; it marks a historic momentum towards the inclusion of sexual and gender minorities into the Kenyan democratic space.

“It alludes to a country that is keen to becoming much open and democratic despite the challenges. By underscoring the constitutional morality of inclusion at the expense of religious morality, the judges honoured the spirit and aspirations of Kenyans who enacted this constitution after a period of post-election violence that had been simmering after years of virulent exclusion of others.

“This rejection of popular morality and religion limitations to rights will hopefully be a beckon of jurisprudence to other thirty eight African nations that are still moral arguments to limit rights of minorities.”

In December last year, a court in the country established a precedent that affirms basic rights for intersex people.

Last year the president of Kenya signed a law legalising heterosexual polygamy, while maintaining a ban on gay sex.