A Christian who was sacked as a non-executive NHS director and magistrate after saying that children do best with a mother and father has lost his appeal.
Richard Page now intends to take his case to the Supreme Court after the Court of Appeal ruled on Friday that his sackings were lawful.
The 74-year-old, from Kent, was fired after commenting in a 2016 TV interview with Piers Morgan that he had been discriminated against for his Christian beliefs on parenting while presiding over an adoption case.
Supported by the Christian Legal Centre (CLC), he has been fighting against the decisions to remove him from his positions for the last six years.
Responding to today's outcome, Mr Page said: "This is another deeply concerning ruling from the courts against Christian freedoms, and I intend to appeal the decision to the Supreme Court."
In his judgment, Lord Justice Underhill said that the magistrate's views on same-sex marriage and "homosexual activity" might cause "offence".
"The extent to which it is legitimate to expect a person holding a senior role in a public body to refrain from expressing views which may upset a section of the public is a delicate question," the judgment reads.
The judgment went on to say that removal from his position in the NHS was justified because his answers to Morgan's questions might "deter mentally ill gay people in the Trust's catchment area from engaging with its services."
The judgment suggested that Mr Page should have "declined to answer" questions on his beliefs. It also refuted the argument of Mr Page's lawyers that firing him risks self-censorship on sexual morality by people in public office.
Lord Justice Underhill said: "The issue raised by this case is not about what beliefs such a person holds but about the limits on their public expression."
He added: "The freedom to express religious or any other beliefs cannot be unlimited. In particular, so far as the present case is concerned, there are circumstances in which it is right to expect Christians (and others) who work for an institution, especially if they hold a high-profile position, to accept some limitations on how they express in public their beliefs on matters of particular sensitivity."
CLC chief executive Andrea Williams said the ruling would leave public office holders with little choice but to keep their beliefs to themselves.
"This is the first time the Court of Appeal has endorsed the perverse distinction between unlawful discrimination for Christian beliefs and lawfully dismissing someone for offending an LGBT audience by expressing those beliefs," she said.
"This is simply an artificial way to exclude Christian beliefs from the protection of the law. Nobody would get away with applying a similar distinction to any other protected characteristic. You would not get away with dismissing a homosexual for coming out as a homosexual, and then saying: "we duly respect your sexual orientation as long as you keep it to yourself". This is an unfair and chilling decision, and the Supreme Court should put it right.
"The judgment sends a direct message to Christian public servants that if they allow their beliefs to influence their decision-making while in public office, they must self-censor and be silent, and are ultimately unfit for that office. If they express their beliefs in private to colleagues, they will be reprimanded, and if they then state those beliefs to the media, they will be sacked and will have their lives torn apart."
She went on to warn that more Christians may lose their jobs unless they publicly support homosexuality.
"The idea that you can remove a director from the NHS based on a perception that members of the LGBT community may be offended by something he said in the media, is extraordinary and should concern us all," she said.
"This ruling provides a green light for employers to punish Christian employees who do not fall in line with and unquestionably support LGBT ideology.
"We will continue to stand with Richard Page as he seeks justice. We will not stop until this wrong is put right."