Image copyright Quentin Rayner Image caption Jeremy Pemberton (right) became the first gay British clergyman to marry his same-sex partner

The first Church of England vicar to marry his same-sex partner is taking a bishop to an employment tribunal after a job offer as a chaplain to the NHS was withdrawn when the bishop refused him the necessary licence.

The vicar, Canon Jeremy Pemberton, will argue that the bishop unlawfully discriminated against him in refusing the licence, without which he could not take up the job.

So what does the case say about the Church of England's position on same-sex marriage?

When Parliament made same-sex marriage legal in England and Wales with effect from March 2014, it created a headache for the Church of England and other organised religions whose teachings, tradition and doctrine hold that marriage can be only between a man and a woman.

While organised religions have specific legal opt-outs from the Equality Act 2010 and the Marriage (Same Sex Couples) Act 2013, the case being brought by Canon Pemberton at an employment tribunal in Nottingham is the first significant legal test of the Church's position and will be closely watched by all sides in the debate.

The Church of England maintains that its doctrine is clear, and that while it supports vicars in same-sex civil partnerships, marriage is between a man and a woman.

The facts of the case are these: after Jeremy Pemberton became the first Church of England vicar to marry his same-sex partner, Laurence Cunnington, last year, the acting Bishop for Southwell and Nottingham, Richard Inwood, revoked Mr Pemberton's permission to officiate as a priest in that diocese and wrote to the NHS trust in Nottinghamshire saying he would not give Mr Pemberton the licence he needed for the new job.

The NHS then withdrew its job offer, as its chaplains must show that they are "in good standing" with their own religious organisation before taking up a post.

However, Mr Pemberton has continued to work as a chaplain in his old job in another NHS Trust in a different diocese, in Lincolnshire.

Divided opinions

At the tribunal, the Bishop will argue that the Church's doctrine and pastoral guidance make clear that those in holy orders cannot enter into a same-sex marriage, as the clergy must "model the Church's teaching" in their own lives.

Image copyright Thinkstock Image caption The church believes marriage should be between a man and a woman

Mr Pemberton will argue that the bishop unlawfully discriminated against him, and will also question whether the Church's view on same-sex marriage is a matter of doctrine.

The question of same-sex marriage is one that has already divided opinion within the Church of England and the worldwide Anglican communion, and will continue to do so in the future, perhaps even more seriously than the issue of ordaining women priests and bishops.

The Church has tried to take the heat out of the question by carrying out internal consultations for two years on same-sex marriage, called shared or facilitated conversations, in which those of opposing views have the chance to share them with one another in a "safe space".

However, given the strength of feeling among supporters and opponents of same-sex marriage, it seems unlikely that there will be the same room for the kind of compromise that was eventually reached over women priests.

The most recent guidance from the House of Bishops in February 2014 on same-sex marriage said the bishops were in agreement that "the Christian understanding and doctrine of marriage as a lifelong union between one man and one woman remains unchanged", as set out in Canon Law as Canon B30 and in the Book of Common Prayer.

Canon Law: Holy Matrimony:

"The Church of England affirms, according to our Lord's teaching, that marriage is in its nature a union permanent and lifelong, for better for worse, till death them do part, of one man with one woman, to the exclusion of all others on either side, for the procreation and nurture of children, for the hallowing and right direction of the natural instincts and affections, and for the mutual society, help and comfort which the one ought to have of the other, both in prosperity and adversity."

The Church acknowledged that its teachings now diverged for the first time from the general understanding and definition of marriage by Parliament.

Theological debate

However, the Church of England says that it nonetheless values theological debate, and allows clergy to argue for a change in its teaching on marriage and human sexuality, while making clear that they should not marry someone of the same sex.

At the same time, it has no wish to be seen as homophobic, and has also issued guidance to say that the Church welcomes gay and lesbian clergy and laity and considers homophobia unacceptable.

But can it hold those two positions at the same time for much longer, especially as social mores around the Church continue to change rapidly, with younger generations in the UK far more likely than their elders to accept same-sex marriage as a given?

The Church may well see its position in this case as clear: that those who serve as clergy must live up to all the teachings of the Church, whether they agree with them or not.

However, campaigners for change in its current position on same-sex marriage will argue with equal vigour that the Church's doctrine has adapted in the past to accommodate changing social mores, and - if it wanted to - the Church of England could do so again.