A Christian who was demoted for posting his opposition to gay marriage on Facebook has won his breach of contract action.

Adrian Smith, 55, lost his managerial position, had his salary cut by 40%, and was given a final written warning by Trafford Housing Trust after posting that gay weddings in churches were "an equality too far".

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

Smith brought breach of contract proceedings, saying the trust acted unlawfully in demoting him, and Mr Justice Briggs ruled in his favour at London's High Court.

According to the judgement, Smith is "a practising Christian and occasional lay preacher", who described himself on Facebook as a “full on charismatic Christian”.

The saga began when Smith posted a BBC article on his Facebook page about gay marriage, with the comment "an equality too far".

Work colleagues posted below, enquiring if Smith supported gay marriage or not. He replied: "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 same sex then that is up to the state; but the state shouldn’t impose its rules on places of faith and conscience.”

Smith was suspended from work, on full pay, in February, and told he deserved to be dismissed for "gross misconduct", and was demoted to a non-managerial role with the Trust, and given a 40% pay cut.

On his Facebook, Smith listed his place of work, which Trafford Housing Trust alleged could mean his views were taken to be representative of his employer.

They said he had breached the code of conduct for its employees, and acted contrary to the Trust’s equal opportunities policy.

But Mr Justice Briggs ruled: "Mr Smith’s Facebook wall was not purely private, in the sense of being available only to his invitees it was not in any sense a medium by which Mr Smith could or did thrust his views upon his work colleagues."

He said that the "very modest" damages due to Mr Smith was the very small difference between his contractual salary and the amount actually paid to him during the 12 weeks following his assumption of his new, but reduced, role.

He added: "I must admit to real disquiet about the financial outcome of this case.

"Mr Smith was taken to task for doing nothing wrong, suspended and subjected to a disciplinary procedure which wrongly found him guilty of gross misconduct, and then demoted to a non-managerial post with an eventual 40% reduction in salary.

"The breach of contract which the trust thereby committed was serious and repudiatory.

"A conclusion that his damages are limited to less than £100 leaves the uncomfortable feeling that justice has not been done to him in the circumstances."

Smith said in a statement outside court: "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'.

"My award of damages has been limited to less than £100 - but that is for technical legal reasons and the judge made it clear he was not able to award me a much larger sum.

"But I didn't do this for the money - I did this because there is an important principle at stake.

"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.

"However, to the bitter end, they claimed I had broken equality policies and brought the Trust into disrepute - all because, like millions of people, I support traditional marriage.

"Something has poisoned the atmosphere in Britain, where an honest man like me can be punished for making perfectly polite remarks about the importance of marriage.

"I have won today. But what will tomorrow bring? I am fearful that, if marriage is redefined, there will be more cases like mine - and if the law of marriage changes people like me may not win in court.

"Does the Prime Minister want to create a society where people like me, people who believe in traditional marriage, are treated as outcasts? That may not be his intention, but, as my treatment shows, that's what will happen.

"The Prime Minister should think very carefully about the impact of redefining marriage on ordinary people."

Matthew Gardiner, chief executive at Trafford Housing Trust said: "We fully accept the court's decision and I have made a full and sincere apology to Adrian. At the time we believed we were taking the appropriate action following discussions with our employment solicitors and taking into account his previous disciplinary record.

"We have always vigorously denied allegations that the Trust had breached an employee's rights to freedom of religious expression under Human Rights and Equalities legislation and, in a written judgment handed down on 21st March 2012, a district judge agreed that these matters should be struck out.

"This has been a case about the interpretation of our code of conduct and the use of social media by our managers.

"This case has highlighted the challenges that businesses face with the increased use of social media and we have reviewed our documentation and procedures to avoid a similar situation arising in the future. Adrian remains employed by the Trust and I am pleased this matter has now concluded."

In response to the amount of money awarded to Mr Smith, he added: "Sadly, the first time we knew that court proceedings had been issued against us was when we read about it in the Press and we had little option but to defend our position.

"We had tried to come to a settlement with Mr Smith which would have resulted in him receiving 10 times the amount he was claiming, but he chose to reject this offer."