A Christian housing worker, who was demoted for posting remarks about equal marriage on Facebook, has won a legal case against his employers.

Adrian Smith lost his managerial position and had his salary cut by 40% by Manchester’s Trafford Housing Trust after he commented in an online news discussion about gay couples marrying in church by saying it was “an equality too far” in February 2011.

When asked by a colleague on what he meant, Mr Smith posted:

“I don’t understand why people who have no faith and don’t believe in Christ would want to get hitched in church.

“The Bible is quite specific that marriage is for men and women. If the state wants to offer civil marriage to the same sex then that is up to the state; but the state shouldn’t impose its rules on places of faith and conscience.”

The comments were not visible to the general public, and were posted outside work time, but the trust claimed he broke its code of conduct by expressing religious or political views which might upset co-workers.

Mr Smith brought breach of contract proceedings, saying the trust acted unlawfully in demoting him.

According to Sky News, on Friday, Mr Justice Briggs ruled in his favour at London’s High Court.

Mr Smith said in a statement: “I’m pleased to have won my case for breach of contract today. The judge exonerated me and made clear that my comments about marriage were in no way ‘misconduct’.

“Britain is a free country where people have freedom of speech, and I am pleased that the judge’s ruling underlines that important principle.

“But this sad case should never have got this far. Long ago, Trafford Housing Trust should have held their hands up and admitted they made a terrible mistake.

“Had they done this then my life would not have been turned upside down and my family and I would not have had to endure a living nightmare.”

The Christian Institute, the group that paid for Mr Smith’s legal case, welcomed the ruling.

In October 2011, human rights campaigner Peter Tatchell said the trust’s actions were “excessive and disproportionate” and it should have simply warned Mr Smith about identifying himself as an employee online.

Mr Tatchell also dismissed the notion that Mr Smith’s views could be considered homophobic and said his position on religious organisations being allowed to opt-out of same-sex ceremonies was in line with current government policy.