In the social and cultural history of Scotland, today is an extraordinary day.

For the first time, gay and lesbian couples will be legally married when they convert their civil partnerships into marriages. Same sex couples will also be able to give notice of their intention to marry from today, with the first ceremonies taking place on Hogmanay.

However it is measured, this change is a remarkable social reform and it is just as remarkable how quickly it has happened and a credit to Holyrood that it voted the change through so resoundingly earlier this year. Scotland is now one of the most progressive countries in the world on what remains a difficult and controversial issue.

In making the change, Scotland's politicians were in some ways leading public attitudes, but in many ways they were following them. Little over a decade ago, only 41% of Scots believed gay or lesbian couples should have the right to marry, but now nearly 70% believe it. There has been a profound and welcome change in public attitudes.

Some groups in society are still struggling with the change however, and that should be understood and respected. The over-65s, for example, are still mostly opposed to same-sex marriage, but it is amongst some religious people that the opposition is greatest, which is why it was right that the legislation on gay marriages included protection for religious groups, who cannot be compelled to perform them.

For the Church of Scotland in particular, the struggle to find a way forward goes on. The Church has confirmed its opposition to gay marriage, and it still has progress to make to find a workable compromise on the ordination of gay clergy. In May last year, the General Assembly voted on an accommodation which retains the ban on the ordination of gay people in relationships, but allows congregations to appoint such a minister if they want to. To many, it looked like an awkward compromise but it sat well with the Kirk's democratic structure, in which congregations vote to approve a minister selected by an elected vacancy committee.

However, it was a compromise that could not assuage the more evangelical wing of the church. Last May, one Edinburgh minister attempted to throw out the compromise altogether and allow only men and women in heterosexual relationships or celibate homosexuals to preach, and while the General Assembly overwhelmingly voted against the move and to keep the compromise, it is clear that the divisions remain.

As procedure dictates, it was always the plan that the compromise would in due course be sent to the Kirk's 46 presbyteries for approval and it now appears that the majority of them have voted in favour. This still leaves a large number opposed and the issue not fully resolved, but it is another step forward on an issue that has dominated the Kirk's agenda for far too long. The church has proved before that it can accommodate both conservative and liberal views (on the ordination of women for example) and they can do so again on the ordination of gay ministers. Anything else risks leaving the Church looking out of touch with the profound social changes which are happening all around it.