A gay priest who was prevented from working as a hospital chaplain after marrying his partner has urged senior judges to find he suffered discrimination.
Canon Jeremy Pemberton, a Church of England (C of E) priest for more than 30 years, had his permission to officiate revoked after he married Laurence Cunnington in April 2014.
He was also denied a licence to officiate in the diocese of Southwell and Nottingham, which left him unable to take up a job offer at the King's Mill Hospital in Nottinghamshire.
Canon Pemberton brought an employment tribunal against the former acting Bishop of Southwell and Nottingham, the Rt Rev Richard Inwood.
The tribunal dismissed his claims of discrimination and harassment and his case was also rejected by the employment appeal tribunal in 2016.
He renewed his fight at London's Court of Appeal on Wednesday, where his lawyers argued the earlier rulings should be overturned.
Sean Jones QC, for Canon Pemberton, told the court the bishop's decisions which barred him from officiating were wrong because the C of E does not have a fixed rule on same-sex marriage among members of the clergy.
He also said C of E clergy members in civil partnerships were allowed to officiate and that those were "effectively indistinguishable" from same-sex marriage.
Mr Jones added: "There isn't a doctrine that says if you have entered into a same-sex civil marriage, then you cannot officiate."
Lawyers for the former bishop said it was accepted Canon Pemberton felt "humiliated" by the decisions, but the tribunal was right to find there was no "homophobic harassment".
In court documents, Thomas Linden QC said the decisions were taken on the grounds Canon Pemberton had "publicly flouted the doctrines of the Church on marriage, whereas his duty as a priest was to exemplify them".
He added: "As a result, he remained a priest and he was perfectly entitled to remain a member of the Church, to continue to participate in the life of the Church, and indeed to continue to argue for a change in the Church's position on same-sex marriage.
"But he did not have permission to officiate in the diocese of Southwell and Nottingham."
The hearing before Lady Justice Gloster, Lord Justice Underhill and Lady Justice Asplin, continues on Thursday.