Archbishop of Canterbury in Church of Scotland General Assembly first
The Archbishop of Canterbury has become the first head of the Church of England to take part in a debate at the Church of Scotland's General Assembly.
The Most Reverend Justin Welby was speaking as the Kirk approved a closer working relationship with the Church of England.
The agreement was also formally approved at the Church of England General Synod in London in February.
The Church of Scotland's six-day assembly opened on Saturday.
Under the terms of the partnership, members from both denominations will be welcome in one another's congregations.
And ordained ministers will also be allowed to exercise ministry within the existing discipline of each church - though only within England and continental Europe.
Speaking ahead of the agreement - known as the Columba Declaration - being unanimously approved by the general assembly, Archbishop Welby said the two churches were already united historically, politically and economically.
He wants to see the churches work more closely even though differences over same-sex marriage remain.
The General Assembly of the Church of Scotland voted to allow its ministers to be in same-sex marriages on the first day of the 2016 General Assembly.
The Kirk also overwhelmingly backed the case for the UK remaining in the European Union.
Archbishop Welby said: "We know that there are serious issues to be faced in our relation with you around recognition and reconciliation of ministries.
"We know too that while in facing common challenges we have so much we can learn from one another and so much we can do together, we won't always necessarily find ourselves walking in stead with one another - something I've been particularly conscious of as, like you, we have been considering the issues around same-sex marriages and following your earlier debate on ministers in same-sex marriages.
"But what we believe we are providing in this report is a sound framework for us to affirm and build on the agreement we have, for the sake of our common witness to Christ."
'Growth in fellowship'
Former Archbishop of Canterbury Dr Rowan Williams addressed the General Assembly in 2012 but did not take part in a debate.
Ahead of the debate, the former Moderator of the General Assembly of the Church of Scotland, the Right Rev Dr Angus Morrison, said the declaration was largely symbolic but paved the way for "further growth in fellowship and for extending partnership in mission as sister and national churches".
Other topics of discussion during the general assembly will be corporal punishment of children, climate change, the refugee crisis and exploring ways of growing the Church via the internet and social media.