The South African Equality Court has ruled against a pastor who attempted to defend his numerous anti-LGBTQ comments with his religious beliefs.

Oscar Bougardt was found to be in contempt of court over anti-LGBTQ comments he made on social media. He had agreed to stop spreading anti-LGBTQ hatred after reaching a settlement from a previous case.

The South African Human Rights Commission first made the complaint in 2013. Although Bougardt vowed to stop spreading anti-LGBTQ hate, News 24 reported that he hadn’t.

They reported that Bougardt had called for gay people to be dealt with “like they do in Nigeria.” Being LGBTQ is illegal in Nigeria, with a maximum punishment of 14 years. However, in some Northern areas of the country, the punishment is death.

Before appearing in court, Bougardt said that his only crime was “preaching the bible.” However, Judge Lee Bozalek didn’t agree with him, and ruled that even if his comments had some religious basis, he was in violation of a previous settlement. Bougardt has received a suspended sentence, but could face 30 days in prison. He also faces a fine of £26,000.

Related: Creators of LGBTQ film The Wound head to South Africa’s courts after the film is classified as porn

Back in January, Bougardt told News 24: “Why should we be tolerant of their criminal lifestyle? Ninety-nine percent of paedophiles stem from homosexuality.

“I’m saying so because it is proven that 99% of the paedophiles have a homosexual background. They are blaming their previous lifestyle on what happened. Go and read up on it.”

Following these comments, Hendrick Baird, the radio chairperson of GaySA challenged him to prove his claims. In an open letter, Baird wrote: “The police crime statistics say nothing about paedophilia, only reporting sexual violence against children and infants. So I must say it is not proven at all.”

Baird added that the only research he could find that could possibly prove Bougardt’s claims came from “far-right US-based Evangelical organisations of the [Steven] Anderson ilk.”

Related: 10 years and still no Hate Crimes Law in South Africa to protect LGBTQ people