During his speech the King, who was joined by the Queen on his visit, told the Parliament that when it reconvened in 1999 it marked a “new dawn” for the country.
He said that the values inscribed on the mace his mother had given the Parliament 25 years ago – wisdom, justice, compassion and integrity – were the “most Scottish of values”.
He added: “We are often told that we live in an era of polarisation and division.
“If that is so, then it is perhaps even more important, not less, that in the vital areas of representation, of political debate, of policymaking and of discourse, these values – together with hope, civility, and generosity of spirit – are never far from the heart of even the most difficult of issues.”
However, the King later added action would be needed to handle the challenge of climate change.
He said: “Today is an important milestone. As we look ahead to the next quarter of a century and beyond, there remains much more to be done, for Scotland, for the United Kingdom and, equally, in addressing the challenges we all share as inhabitants of a planet whose climate is changing dangerously and whose biodiversity is being seriously depleted.”