The General Assembly of the country’s largest Protestant Church narrowly voted in favour of a compromise motion aimed at ending four years of division.

The new deal now has to be written into a new Church law and authorised by next year’s General Assembly. It will affirm the traditional teaching of the Church as favouring heterosexual ministers, but allows congregations to ‘opt in’ to select gayministers if they wish.

The General Assembly, equivalent to the Church of England’s synod, rejected a motion which would have made gay ordination, solely for ministers in civil partnerships or who are celibate, the default position of the Church of Scotland, by 340 votes to 282.

The compromise vote came after the former moderator of the General Assembly, the Very Rev Albert Bogle, tabled a new motion in an attempt to bridge the gap between the original revisionist and traditionalist motions.

Bogle insisted his motion was not a delaying tactic but a way of giving the Church more time to move forward. He also told commissioners that as a traditionalist, the ‘permissive’ motion was a considerable compromise on his own convictions. ‘None of us will be completely happy but we’ll get over it…and be able to grow together,’ he said. ‘I’m moving a huge bit ? you don’t know how much ? but that doesn’t matter; we’re moving together.’