The Church of Scotland is expected to take the most critical step towards acceptance of openly gay clergy as the historic General Assembly opens in Edinburgh.

The assembly begins with the installation of the Moderator Rev Dr Angus Morrison, who was forced to withdraw last year after being diagnosed with prostate cancer.

Now fully recovered, one of the Moderator's first tasks will be to chair an historic vote on the ordination of ministers in same sex civil partnerships.

It is expected to be accepted by the kirk's highest court but is by no means certain, partly as the annual 800 commissioners who take part, including minsters elders and deacons, changes every year and the mood of the assembly may dictate the outcome.

The debate is a culmination of years of deliberation on this issue, which included a vote by all 45 Presbyteries of the Church, which endorsed the move by 31 votes in favour to 14 against.

The General Assembly will now have the final say on this proposed change to Church law.

The Kirk said 21 out of 806 ministers have left the Kirk over the possibility of the Church agreeing to allow individual congregations to choose a gay minister.

The ordaining of ministers in same-sex relationships has divided the Church since traditionalist members attempted to block the appointment of Rev Scott Rennie, who is in a civil partnership, in Aberdeen in 2009.

This issue will be followed up on Thursday should the move be voted through, with the assembly being asked to include ministers in same-sex marriages in Church law.

The assembly would be expected to reach some decision but options will be open.

The assembly could agree, with certain caveats, that ministers in same-sex marriages could be treated in the same way as those in civil partnerships and that it would be right to do so at the 2015 assembly or agree, with certain caveats, that ministers in same-sex marriages could be treated in the same way as those in civil partnerships and that it would be wrong to do so without consulting the wider church.

The assembly could also broach the issue as a new and separate theological challenge.

This year's Lord High Commissioner to the General Assembly is Lord Hope of Craighead KT PC, a distinguished retired Scottish judge.

During the annual gathering of the Church of Scotland, which has met almost every year since its inception in 1560, 730 Commissioners drawn from congregations across Scotland and beyond will make historic decisions that will affect the direction of the national church. It runs from Saturday May 16 to Friday May 22.

Other topics being considered are tax reform, food banks, mental health, fracking, mediation teams in South Sudan and nuclear weapons.

Some 500 years since the birth of reformation leader John Knox will be marked with a fringe event exploring new discoveries about this complex man from the author of a new book on his life.

On Sunday up to 5000 people are expected to attend the Heart and Soul Festival, a celebration in Princes Street Gardens of the work being done by the Church.

A major new recruitment drive for ministers, called Tomorrow's Calling, will be launched at this event.

A video promoting parish ministry released earlier this week has already received a very encouraging response, with the 20 000 views so far equating to someone watching it every 15 seconds since it went live.

Separately, the Free Church of Scotland has taken the unusual step of asking the Kirk to support its hardline traditionalist stance and stop "ignoring the Word of God".