The Christian Heritage Party (CHP) has won a lawsuit against the City of Hamilton after the city removed bus shelter ads it deemed transphobic.

A panel of three superior court judges say the CHP has a right to engage in political speech, even if some find that speech offensive. The decision doesn't award specific costs, but it strikes down a city decision to remove the bus shelter ads.

The party took the city to divisional court after it placed three HSR bus shelter ads in 2016.

The ads coincided with the city's intent to pass a new transgender and gender non-conforming protocol. The ads depicted someone who appeared to be male entering a door marked "Ladies Showers."

"Competing human rights," it read. "Where is the justice?"

The CHP also distributed 3,500 flyers to Hamilton Mountain homes. The flyers encouraged residents to contact city councillors about keeping transgender women in particular out of women's washrooms.

The city pulled the bus shelter ads and apologized for their "offensive nature." ​It also told Outfront Media, the third-party company that handles HSR ads, to be more careful about ad content.

The party and its Hamilton Mountain electoral district association then sued the city.

The Oct. 4 decision from divisional court judges Ruth Mesbur, Michael Varpio and Frederick Myers says the city violated the party's charter rights to "engage in political discussion."

"A political party's ability to advertise on bus shelters is an important phenomenon for the political process and for society as a whole," it reads.

"Speech is not 'violence' just because people may find it offensive."

The decision also says the city lacked a formal process for yanking the ads. City staff removed the ads to protect its image, the decision reads, without weighing the CHP's charter right to political expression.

The decision encourages the two parties to work out costs themselves. If they can't, both sides will give the court a list of their legal costs.

It's not clear if this means the ads will be back in bus shelters again. The city is considering an appeal.

City lawyers are "reviewing the decision and all options available," said spokesperson Jen Recine.

The city "has a moral obligation" to appeal the decision, says Aidan Johnson, Ward 1 councillor. (Samantha Craggs/CBC)

Coun. Aidan Johnson of Ward 1 said the city has "a moral obligation" to appeal.

"For me, the fundamental issue is whether or not the city has an obligation to ensure that city spaces are equally dignified and equally welcoming for all people."

Albertos Polizogopoulos represented the CHP.

"The court has simply affirmed the importance of freedom of expression and more particularly, the important role freedom of political expression plays in our society," he said. "Needless to say, we're happy with the result.

City council nearly voted in June to settle with the party, but ultimately voted 10-3 to continue in court.