The Duke and Duchess of Cambridge have held a meeting with Gordon Brown who has recently launched a renewed campaign to save the Union.

William and Kate sat down for talks with the former prime minister and his wife Sarah at the Queen’s official Edinburgh residence during the final day of their royal tour of Scotland.

The future king later gave a highly personal farewell speech as his week-long visit drew to a close, describing how Scotland has “shaped” him and praising its people and values.

Duke and Duchess of Cambridge tour of ScotlandThe Duke praised Scotland and its people in his speech at the closing ceremony of the General Assembly of the Church of Scotland (Andrew O’Brien/PA)

William said Scotland was “so important” to himself and wife Kate as he recounted their experiences meeting a range of inspirational people from spritely pensioners, selfless NHS workers and committed charity volunteers over the past week.

READ MORE: William and Kate ride in Duke of Edinburgh’s Land Rover for drive-in cinema at Palace of Holyroodhouse

The argument over Scottish independence has intensified after the Scottish National Party’s landslide victory in the Holyrood election earlier in May, which also produced the largest pro-independence majority in the Parliament in the history of devolution.

Boris Johnson has since stood by his pre-election position, saying the focus should be on the recovery from Covid-19 and not on another independence referendum.

A spokesperson for Kensington Palace said: “During his time in Scotland Prince William has spoken to a broad range of people from different communities including politicians from across the political spectrum.”

The duke sat down for talks with First Minister Nicola Sturgeon at the weekend and also met Alistair Carmichael, Liberal Democrat MP for Orkney and Shetland, when the Cambridges opened Orkney’s hospital.

Scottish Parliamentary Elections 2021Gordon Brown has launched a renewed campaign to save the Union (Jane Barlow/PA)

Soon after the Holyrood election Mr Brown announced his Our Scottish Future think tank which will become a “campaigning movement” seeking to appeal to “middle Scotland”, those who are not entrenched in their positions on the union or independence.

The former prime minister, who played a key role in the No campaign during the 2014 vote, has said those in middle Scotland are “patriots not nationalists” who want to see greater cooperation between the UK’s governments.

Ahead of the Scottish independence referendum in 2014 the Queen reportedly said she hoped voters would “think very carefully about the future”.

READ MORE: William and Kate go sailing in land yachts on West Sands beach in St Andrews

Before the Queen’s reported comment Buckingham Palace had issued a statement, following speculation she was growing increasingly concerned about Scotland breaking away, saying any suggestion the monarch would wish to influence the outcome of the referendum was “categorically wrong”.

Speaking in Edinburgh at the closing ceremony of the General Assembly of the Church of Scotland, William said about some of the memorable individuals he had met: “These people make Scotland the vibrant, friendly, innovative and determined place Catherine and I love, and is so important to us.”

The duke who is the assembly’s Lord High Commissioner added: “I’m shaped by this place.

“The abiding affection I feel for it is rooted in my experience of its everyday life in people, relationships, and its ethic of neighbourliness.”

READ MORE: Rosemary Goring: Battle royal looms as William and Kate deployed to bolster the Union