The Mayor of London, Boris Johnson, will face Christian groups in court this week over allegations that he denied their right to free speech by banning an ad campaign which promoted discredited gay cure therapy.

Dr Mike Davidson of the Core Issues Trust will appear in the High Court on Thursday to argue that the Mayor’s decision to pull a bus ad created by a duo of Christian groups was unlawful stifling of their free speech.

The advertisement, proposed by the Core Issues Trust and their fellow Christian group Anglican Mainstream, read “Not Gay! Ex-Gay, Post-Gay and Proud. Get over it!”.

It parodied a Stonewall ad which ran the text “Some people are gay. Get over it!”.

Core Issues Trust and Anglican Mainstream hoped in May of last year to use the ad to promote therapies which claim to be able to change the sexuality of gay people. The government’s official position on gay cure therapies is that they are harmful and should not be condoned.

Although the ad campaign was passed by the Committee of Advertising Practice, Mr Johnson intervened to pull it before it could run – just days before the Mayoral Election.

Dr Davidson, who claims to have benefited from gay cure therapy himself, said he hoped the judicial review would result in Transport for London running the ads.

“It was a mistake to assume these views we were expressing came from entrenched homophobia, and failed to recognise that people who want to walk away from their homosexual feelings are a group in their own right,” he said.

Andrea Williams of the Christian legal centre will be supporting Dr Davidson’s case. She argues: “The ban on these advertisements was the beginning of a kind of reverse discrimination which threatens to obliterate debate in the public sphere.

“Boris Johnson needs to realise his mistake and ensure there is freedom for all in the marketplace of ideas. He cannot prefer one group over another.”

The plaintiffs will point to a bus ad run in 2009 by Richard Dawkins and the British Humanist Association which read “There’s probably no God. Now stop worrying. And enjoy your life,” as evidence of this reverse discrimination.

At the time of his intervention, Mr Johnson said: “London is one of the most tolerant cities in the world and intolerant of intolerance. It is clearly offensive to suggest that being gay is an illness that someone recovers from and I am not prepared to have that suggestion driven around London on our buses.”

He argued that pulling the campaign was actually in the interest of the Christian groups, as the backlash against them would have been considerable.

Transport for London banned the ad following the Mayor’s intervention.

In a statement, posted on Twitter it said: “Anglican Mainstream ad just brought to our attention and will not run on London’s bus or transport networks. We don’t believe these ads reflect TfL’s commitment to a tolerant and inclusive London.”

Stonewall’s “Some people are gay. Get over it!” adverts were placed on around 1,000 buses in London in 2012.

Last November, a Christian driver refused to cover a route between Rotherham and Sheffield because the bus sported the Stonewall ad, leaving passengers temporarily stranded.