Britain's High Court ruled Friday that a Christian was unfairly demoted for posting his opposition to gay marriage on Facebook.
Adrian Smith was stripped of his management position with the Trafford Housing Trust in northwest England and had his salary cut by 40 percent after posting that gay weddings in churches were "an equality too far."
The trust said Smith broke its code of conduct by expressing religious or political views that might upset co-workers.
But High Court judge Michael Briggs ruled Friday that Smith had been "taken to task for doing nothing wrong" and found his employer guilty of breach of contract.
Smith said he was glad the court had backed the principle that "Britain is a free country where people have freedom of speech."
And he received support from veteran gay rights and civil liberties campaigner Peter Tatchell, who said Smith's employer had overreacted.
"In a democratic society, Adrian has a right to express his point of view, even if it is misguided and wrong," Tatchell said.
Trafford Housing Trust chief executive Matthew Gardiner, said he "fully accepted" the court's decision and had apologized to Smith, though it was not clear whether he would be reinstated.
In Britain, same-sex couples can currently form civil partnerships, which carry the same legal rights as marriage. The government wants to change the law to include gay marriage, a move opposed by many religious groups.