Two decades after officially opening the first elected assembly in Edinburgh, the Queen hailed the “remarkable” Scottish Parliament as she took part in its 20th anniversary celebrations.
Her Majesty said the Parliament was still “at the centre of Scottish public life”, and told how she had “watched Scotland grow and prosper” over the last two decades.
The Queen was accompanied by her son, the Prince of Wales – who is known in Scotland as the Duke of Rothesay.
"As we look to the future, it is my sincere hope that this Parliament, and all those who come to serve in it, will use the power of this chamber to celebrate those invisible pillars of our communities, and follow their example by working tirelessly to improve people’s lives, and strengthen the bonds of friendship and partnership both at home and abroad," she said.
Meanwhile, First Minister Nicola Sturgeon told how legislation passed at Holyrood had “made Scotland a better place”.
The SNP leader said: “Although this parliament is only 20 years young, it has long come of age.
"This parliament is firmly established as the centre of this nation’s public life. We have become the democratic institution which people look to, to reflect their priorities, values, hopes and dreams.”
Ahead of the Queen’s arrival, the Crown of Scotland was brought in a procession from Edinburgh Castle to Holyrood, carried by the Duke of Hamilton and accompanied by the Pipes and Drums of the 1st Battalion of the Scots Guards.
Presiding Officer Ken Macintosh met the royal party, with the Queen then going on to greet Ms Sturgeon and senior figures from the other political parties at Holyrood.
Current and former MSPs were present, along with some of the Scots who were born on July 1 1999 – the day the Scottish Parliament was officially opened.
Mr Macintosh said over the last 20 years Holyrood had “grown into a self confident institution”.
And he noted some of the parliament’s achievements, including “the smoking ban and the minimum pricing of alcohol, free personal care and the abolition of tuition fees, the removal of Section 28 and the introduction of equal marriage”.
Mr Macintosh added: “I am proud of that legislative record, but just as important is that the parliament itself has evolved to reflect the needs of the people we serve.”
And Ms Sturgeon said: “The 290 Acts this parliament has passed have varied in their impact. But from land reform in the first parliament to equal marriage in the last, to the Social Security Act in this, they have all made Scotland a better place.”
Scottish Secretary David Mundell, who was one of the MSPs elected 20 years ago, watched proceedings from Holyrood’s gallery.
The MP said afterwards: “This is a really important day. I remember the opening ceremony so clearly and I remember, too, the sense of excitement that people right across Scotland shared at the opening of their new parliament.”
He added: “As a UK Government minister I’m proud to have played a role in delivering extra powers following the Calman Commission and, more recently, the Smith Commission.
“Through the Scotland Acts, we have made Holyrood one of the most powerful devolved parliaments in the world. Holyrood is well-equipped to face the next 20 years.”