A Christian group has told the High Court that a ban on bus adverts which claimed gay people can be “cured” of their sexuality was a “deep threat” to democracy.

Appearing before Mrs Justice Lang on Thursday, Dr Mike Davidson of Core Issues Trust said Transport for London’s decision to pull the adverts in May of last year was unlawful and “a deep threat” to democratic freedoms.

The decision was made just days before the London mayoral election, with Mayor Boris Johnson warning that the ads were “clearly offensive”.

The posters, which were due to run on 24 buses, said: “Not Gay. Ex-Gay, Post-Gay and Proud. Get over it!” and were in response to a previous poster campaign by gay rights charity Stonewall, which said: “Some people are gay. Get over it!”

Appearing before the High Court for Core Issues Trust, Paul Diamond said: “We believe this is a very important free speech case on whether a totally temperate, restrained advertisement can be put on the sides of London buses.”

Meanwhile, a Transport for London (TfL) spokesman said: “The advertisement breached TfL’s advertising policy as, in our view; it contained a publicly controversial message and was likely to cause widespread offence to members of the public.

“This view was borne out by the high number of complaints we received about the ad and the large number of negative comments on social media and newspaper websites.”