Transport for London's decision to ban a Christian group's controversial bus advert about gays was not unlawful, the High Court has ruled.
The ad posters, earmarked for the sides of the capital's buses, suggested that gay people can be helped to "move out of homosexuality". The advert read: "Not Gay! Ex-Gay, Post-Gay and Proud. Get over it!"
Core Issues Trust, the Christian charity behind the ads, had taken the matter to court, claiming that London Mayor Boris Johnson - who is chairman of TfL, was "politically driven" when he intervened to block the ad in the run up to the last mayoral elections.
Mr Johnson condemned the "gay cure" ad as "offensive to gays" and said it could lead to retaliation against the wider Christian community.
But a judge ruled that the Mayor of London did not abuse his position.
Mrs Justice Lang, sitting at London's High Court, said that TfL's process in introducing the ban "was procedurally unfair, in breach of its own procedures and demonstrated a failure to consider the relevant issues".
But that was outweighed by factors against allowing the ad, including that it would "cause grave offence" to those who were gay and was perceived as homophobic, "thus increasing the risk of prejudice and homophobic attacks", said the judge.
TfL insisted that it was an internal decision to ban the advert, of which Mr Johnson was "informed".
Welcoming the court ruling, a spokeswoman for the transport body said: "The advertisement clearly breached our advertising policy as it contained a controversial message and was likely to cause widespread offence to the public.
"This was borne out by the hugely negative public reaction the advertisement generated, including on social media and newspaper websites. We are taking steps to address the Judge's comments regarding our internal processes."
The judge revealed her concern over the issues raised by the case by giving Core Issues permission to appeal to the Court of Appeal.
The judge said that, although she did not think an appeal would succeed, there were "compelling reasons" to allow an appeal to go ahead.
She said the case "concerns interference with the right to freedom of expression which is a matter of such fundamental importance that it merits consideration by the appellant court."
Core Issues, which works with gay people seeking to change their lifestyles, had asked the judge to rule that the charity was unlawfully denied the freedom to express its views on homosexuality.
Paul Diamond, appearing for the charity, said it was imposed in April last year "very close" to the mayoral election on May 3, when Mr Johnson defeated political opponent Ken Livingstone.
Mr Diamond said: "It was clearly a highly-charged issue, and the mayor took credit for the highly, politically-driven decision.
"The mayor was strongly of the view this advertisement should not run."
Mr Diamond said the Core Issues Trust had nothing but "utter respect for people struggling with same-sex attraction".
He denied that it was attempting to offer a so-called "gay cure".
He said the ads were a response to a bus poster campaign by gay rights group Stonewall, which carried the message: "Some people are gay. Get over it!"
Mr Diamond contended the trust was equally entitled to express its view on the sides of buses, and to have its right to freedom of expression protected under Article 10 of the European Convention on Human Rights.
The remains of the mountain cabin where the rogue cop died
Karen and Jim Reynolds were tied up by Dorner
Rick Heltebrake was key to the arrest, says his lawyer
The stadium during London 2012
Boris Johnson says the deal 'defies the gloomsters'
Karen Brady: 'We'll pay our way'
David Sullivan and David Gold said the decision was 'fantastic'
Christina's parents said she was "bubbly, beautiful and intelligent"
A message from Christina's parents
Christina was stabbed on a bus on Hagley Road, Birmingham
Christina was attacked on the top deck of the bus
Video taken on-board the ship showed the arrival of Israeli commandos
Phil emerges from his hole in Pennsylvania in February with good news!
Three amber snow warnings were issued across Britain
Buxton in the Peak District was said to be virtually cut off by the snow
Northern Ireland's game against Russia at Windsor Park has been postponed
The Philpotts' children who died in the fire
San Diego's La Jolla Beach. Pic: KFMB
The front page was published on Twitter
Police are investigating Imie Harrison's death at Woverley Court Lock
Ed Miliband called George Osborne a "downgraded Chancellor"
The Chancellor leaving Number 11 Downing Street with his Budget
A Twitpic shows George Osborne at work 