Canon Jeremy Pemberton (right) and his husband

A hospital chaplain who was effectively sacked after getting married has lost an appeal.

The challenge from gay former hospital chaplain Jeremy Pemberton was today thrown out by the Court of Appeal, which upheld a ruling finding that the Church of England did not violate its rules by acting to remove him.

Canon Pemberton was the first member of the Church of England clergy to enter into a same-sex marriage, when he wed his partner Laurence Cunnington in April 2014.

As the Church of England bans gay clergy from marrying, the NHS hospital chaplain had his permission to officiate revoked by a Bishop. This meant he was blocked from taking further jobs and was effectively forced out of the profession.

Canon Pemberton pursued a claim on the grounds that the Church discriminated against him because of his sexuality – but he lost a legal challenge after the church argued it was exempt from the Equality Act’s anti-discrimination protections.

The Court of Appeal sided with the Church today, upholding the original ruling.

Lord Justice Underhill said: “If you belong to an institution with known and lawful rules, it implies no violation of dignity and it is not cause for reasonable offence that those rules should be applied to you, however wrong you may believe them to be.”

In a statement, Jeremy Pemberton said: “The Court of Appeal has examined the issues in my claim against Bishop Richard Inwood and has dismissed them. I am grateful for the expertise of the Court, though naturally disappointed in the judgment.

“I have reached a settlement agreement with the Church of England that I will not pursue this claim any further. They, on their part, will not apply for costs against me.”

He added: “I am more grateful than I can say to Sean Jones QC, Helen Trotter, The Worshipful Justin Gau, and Susanna Reynhart of Thompson Snell & Passmore. Since the end of the original tribunal hearing they have all represented me pro bono with great skill and commitment.

“We have worked together for three and a half years on this case, and I count myself very blessed to have had them alongside me every step of the way.

“I am also very grateful to Bishop Alan Wilson, my expert witness, and to the countless people who have written, messaged, telephoned and spoken to me expressing their support.”

He added: “The Church of England has established through this process that it can continue to discriminate legally against LGBT people in relation to their employment, even where that employment is not within the boundaries of the church’s jurisdiction.

“This will seem to most people in the UK today an extraordinary result, and not one that will help commend the claims of Christ to the nation.

“An official position that regards the loves and commitments of LGBT people, including clergy, as sinful is years overdue for thorough-going revision.

“The need for a revolution in attitudes and practices in the Church towards this minority is still acute – we continue to wait for real change.

“I hope that I shall be permitted to return to active ministry at some point. Had I committed an infraction that was dealt with under the Clergy Discipline Measure, then I might have been told I was being suspended for a definite period, with the hope and expectation of restoration after that.

“Because I was never dealt with under any process, I have no permission to officiate at all, and no indication of when I might hope to have that restored. Everything is in the hands of, and at the will of individual bishops.

“Finally, I owe most to Laurence Cunnington. He has been rock-like and constant in his support and love in this, as in all things. We look forward to celebrating our fourth wedding anniversary soon. I cannot thank him enough for the honour he does me in being my husband.”

National Secular Society chief executive Stephen Evans said the decision highlighted “the need for change on several fronts”.

He said: “It beggars belief that religious groups should have the legal authority to prevent staff working in positions in the publicly-funded NHS at all. And it’s particularly appalling that the established Church of England can do so to people because they’re married to someone of the same sex.

“This case shows the need to end religious chaplaincy in the NHS and to reconsider the Church of England’s exemption from equality laws. NHS staff should be appointed to serve us all, rather than because they fulfil a religious role.”

The Bishop of Buckingham Alan Wilson recently called for the Church of England to be stripped of an exemption in equality laws that allow it to openly discriminate against gay people such as Pemberton.

Asked if it the law should be changed, the Bishop of Buckingham Alan Wilson said: “Yes.”

Dr Wilson said: “The Equality Act is used as an accountability standard in modern Britain.

“It describes how we understand public accountability in every institution except the church. That does seem quite extraordinary.”

He added: “If the church were far more observant of the Equality Act, then deep structures of abuse, homophobia and sexism would not be embedded in the church in the way they are.”

“It’s in Romans 13.”

The Bible passage states, “Let everyone be subject to the governing authorities, for there is no authority except that which God has established. The authorities that exist have been established by God.”

Despite arguing that it is exempt from the law, the Church has itself threatened to bring a case under the Equality Act in a row over cinema advertising.