The Church of Scotland could make history next week by approving religious same-sex marriage.
The 2022 General Assembly began in Edinburgh on Saturday as 400 commissioners gathered on The Mound and 200 more joined online.
The vote on allowing ministers to conduct same-sex marriages will take place on Monday.
The first order of business was to officially install Rev Dr Iain Greenshields as the next Moderator.
Last year the Methodist Church became the largest religious denomination in the UK to permit same-sex marriages.
It is not allowed in the Church of England or the Roman Catholic Church, but is welcomed in the Scottish Episcopal Church, the United Reformed Church and the Quakers.
Church of Scotland commissioners will vote on a change to church law which would enable clergy to apply to become authorised celebrants of same-sex marriages.
However, the church made clear that no person would be made to conduct ceremonies unless they wished to do so.
Ahead of the vote, a report to the General Assembly showed that 29 of 42 presbyteries supported the change, which would also allow Kirk buildings to be used for gay weddings.
In 2009 Rev Scott Rennie was the first openly gay clergyman in the Church of Scotland to have his appointment approved - despite protests by some sections of the Kirk.
He left Queens Cross Church in Aberdeen this month to take up a post in London.
He wanted to be married to his husband in a religious ceremony, but it was not possible at the time.
He told BBC Radio Scotland's Drivetime programme he thinks attitudes within the church have changed since then.
"When you think back to 2006 when the idea first came up that perhaps ministers would bless same sex civil partnerships or relationships, there was quite a bit of discussion and disagreement over it," he said.
"There has been a whole trajectory over the last 15 years towards the place of same sex couples and the place of LGBTQ people in the Kirk, being recognised and celebrated, whether that is being able to be openly gay and in ministry or being able to be a minister of a parish and be in a same sex relationship, all that has changed markedly.
"It feels fairly normal now but it wasn't always like that. So I guess over the last 15 years things have moved markedly."
Move towards inclusion
Rev Rennie believes it will be an emotional moment if the legislation passes.
"I will be delighted," he said. "I will be able to conduct same-sex marriages, and people like me will not have to go through the kind of things we have been through in the past 15 years.
"Everyone's views will be respected, but for those of us in the more progressive wing, I would say it is a day to celebrate the whole move towards inclusion within the Church of Scotland."
The new Moderator Dr Greenshields, 68, has served as the minister of St Margaret's Community Church in Dunfermline, Fife, since 2007.
He takes over from former deputy first minister Lord Wallace who presented his successor with the ring and chain of office.
Dr Greenshields will chair proceedings at the Assembly Hall for five days and will then act as the church's ambassador at home and abroad for the next 12 months.
He said: : "I am genuinely humbled, honoured and privileged to be appointed as Moderator and to serve both you, this Church and our Lord in this capacity.
"I am very much looking forward to the coming days as we are together both in person and online."
Other business being addressed at the general assembly includes a declaration of friendship with the Catholic Church in Scotland and actions on a wide range of global and societal issues.
They include the use of digital technology for congregations, highlighting work around drug use and recovery, a new glossary of Jewish and Christian terminology to aid interfaith relationships, gender identity and a call to ban conversion therapy.
Members will also address the war in Ukraine, ongoing work to support asylum seekers and refugees, advocating for better access to vaccines in poorer countries and progress on work to achieve a Net Zero Church by 2030.
The forum is expected to express regret over the part played in fuelling a frenzy around witch trials many centuries ago and learn about work to explore the legacy of slavery.