Kenya’s High Court on Friday upheld sections of the penal code that criminalize same-sex relations, a disappointment for gay rights activists across Africa where dozens of countries have similar laws.

The judges’ unanimous ruling in the closely watched case was followed by activists’ vows to appeal. Many in Kenya’s vibrant gay community had hoped the court would make history by scrapping the British colonial-era laws and inspiring other countries in Africa to do the same.

Activists argue that the laws criminalizing consensual same-sex relations between adults are in breach of the constitution because they deny basic rights. The state should not regulate intimacy between gay couples, they say.

These old colonial laws lead to the LGBT community suffering violence, blackmail, harassment and torture. They devastate people’s lives and have no place in a democratic Kenyan society.

The laws prescribe up to 14 years in prison for people convicted of homosexual acts.

Reading the ruling, one of the judges concluded that Kenya had no social pressure to legalize homosexuality.

Reaction was swift.

“These old colonial laws lead to the LGBT community suffering violence, blackmail, harassment and torture. They devastate people’s lives and have no place in a democratic Kenyan society,” the Nairobi-based National Gay & Lesbian Human Rights Commission said after the decision was announced.

At least half of Kenya’s LGBT persons in Kenya have suffered physical and verbal assault, the commission says. Most assaults are not reported because gays don’t have confidence they would get protection from the police, activists say.

In a separate statement, the organization Stonewall UK called the decision “crushing news” and said 70 countries around the world still criminalize same-sex relationships.

Thirty-three of those are in Africa, Human Rights Watch says.

Kenya’s courts, which many assume to be conservative on issues of sexuality, had recently ruled in favor of LGBT rights.

Last year, an appeals court ruled unlawful the use of forced anal exams to test whether two men had gay sex. In 2015, High Court judges ordered a government agency to register a human rights group representing the country’s gay people, saying Kenya’s constitution recognizes and protects the rights of minorities.

Resistance to gay rights exists at the top of Kenya’s politics, however.

Gay rights are “not of any major importance” in the country, President Uhuru Kenyatta told CNN in an interview last year. He said the laws criminalizing same-sex relations are supported by “99 percent” of the Kenyan people.