Gary McFarlane, the Christian sex counsellor who refused to work with gay couples, has lost his Court of Appeal bid.

Mr McFarlane, from Bristol, wanted to challenge a ruling that found in favour of counselling service Relate, which sacked him in 2008 after he said he would not “encourage sin” in gay and lesbian couples

Dismissing his application, Lord Justice Laws said legislation used only to protect religious views could not be justified.

The judge continued: “We do not live in a society where all the people share uniform religious beliefs.

“The precepts of any one religion – any belief system – cannot, by force of their religious origins, sound any louder in the general law than the precepts of any other.”

According to the BBC, Mr McFarlane said he was “disappointed and upset” by the decision and added that people like himself should be able to avoid having to “contradict their very strongly-held Christian principles”.

The former Archbishop of Canterbury Lord Carey had sent a statement to the judge arguing in support of Mr McFarlane.

He called for judges dealing with cases where religious beliefs and homosexuality clash to step aside.

Lord Carey added that decisions in favour of gay rights were “dangerous” to the social order and even went as far as to suggest they could lead to “civil unrest”.

He wrote: “The effect of these decisions is to undermine the religious liberties that have existed in the United Kingdom for centuries.”

Terry Sanderson, president of the National Secular Society, welcomed the decision, saying: “This is the right outcome for this case. The law must be clear that anti-discrimination laws exist to protect people, not beliefs.

“The right to follow a religious belief is a qualified right and it must not be used to legitimise discrimination against gay people who are legally entitled to protection against bigotry and persecution”.

Mr McFarlane, 48, began working as a Relate Avon counsellor in 2003. He said that he had “overcome” his prejudices against same-sex couples, but when beginning training to be a psychosexual therapist, he said his Christian beliefs meant he could not help gay and lesbian couples with intimacy issues.

Last month, a Christian registrar who was disciplined because she would not officiate civil partnerships was refused permission to appeal to the Supreme Court.

Lillian Ladele resigned from Islington council in 2007 after being threatened with the sack. She claims she was a victim of discrimination because of her religious beliefs.

She is now considering whether to take her case to the European Court of Human Rights.

Religious figures claim that her case shows that the rights of religious people come second to the rights of gay and lesbian people.

The law says that religious beliefs cannot be upheld at the expense of outlawing discrimination on the grounds of sexual orientation.