There are rare moments in life when it becomes clear what you have to do. While at school, the only thing I wanted to be was a writer, so - against the wishes of my school headmaster, who would have been better pleased if I'd told him I was going to be a banjo player in a brothel - I became a journalist.

Seven years later, another crossroads. This time, the decision was to study for the ministry. I broke the news to my fellow Edinburgh Evening News hacks in our usual haunt, Baillie's bar. My journalistic mentor, George Millar, had his whisky glass halfway to his mouth. "Jesus Christ!" he exclaimed. Eight years in Easterhouse, seven as leader of the Iona Community and 11 as minister of St Magnus Cathedral followed. After the completion of the new St Magnus Centre, I returned to full-time writing, while retaining my ministerial status.

And now I have embarked on a path which will probably take me out of the ministry altogether. Why?

Where do I begin? Let's start with one of the great joys of life: friendship. Steve and Jane are one of the finest couples I know. Their Christian convictions, though profound, are never trumpeted. Their adopted daughter, who is now happily married, could not have been brought up in a more caring family environment.

Confession time: Steve and Jane are not their names. In fact, they are both women. Bless them - except that I can't, the way things are heading for ministers of the Church of Scotland.

The Kirk's General Assembly, which opens in Edinburgh on Saturday, will hear that presbyteries have voted to deny ministers freedom of pastoral conscience in relation to the blessing of same-sex partnerships. Assuming the assembly endorses the results, such blessings by ministers will be banned, once legislation has been put in place.

To me, it is unjust that Christian people in same-sex partnerships will be denied the church's benediction for the crime of expressing love in the way God made them. What I find distressing is the dishonesty which surrounds this issue. It's no secret that there are plenty of fine clergy and lay people in the Kirk and in the Roman Catholic Church who are gay or lesbian. They help to keep the church going, yet they have grown used to hearing homosexuals vilified. Most have responded with extraordinary grace.

Nevertheless, the voting figures don't lie. It's make-your-mind-up time. Well, I will respond affirmatively to requests for a blessing ceremony where this is pastorally appropriate, whatever the church decides. I fully recognise the right of churches to discipline their clergy, and I will accept the inevitable consequences of my decision. I'll remain a lay member of the Church of Scotland which has given me so much.

This is not some faux martyrdom. (In the days when Christians were threatened with the lions if they didn't recant, I'd have taken one look at the sharp teeth and reached for my quill.) Unlike parish ministers, I can make this choice without great personal sacrifice, since I earn my daily bread from journalism. But the Church of Scotland used to trust its clergy to make conscientious pastoral decisions on the front line. It's my conviction that the removal of freedom of pastoral conscience will eventually turn a broad national church into a gathered sect.

Is there any way out of all of this? One hopeful sign is that a new report on human sexuality will be presented to this year's assembly. I've seen it, and it's a wise and temperate document. It acknowledges sincere and painful differences and seeks to keep an informed conversation going in the church. I believe that the church should do some serious listening to people in civil partnerships. Gays and lesbians have been treated shamefully by the churches for centuries. The Kirk should pause for prayer rather than rush to judgment. We shall see.

As I pack my bags in readiness, I hope the debate rises above the toe-curling cry of "hetero is bettero!" which was used as a refrain by a ranting speaker at one presbytery meeting. (No, I'm not making this up.) I'm not deceiving myself that my own decision will somehow be influential. It is a simple, personal testimony. I believe passionately that when same-sex partners seek the blessing of a generous God upon their loving commitment to each other, they should not have to face yet more rejection.

To my mind, a Kirk which allowed its ministers to bless nuclear weapons but not loving relations between consenting Christians would make a travesty of the Gospel.

There are indeed rare moments in life when it becomes clear what you have to do. This, for me, is one of them.