The Queen visited the Scottish Parliament ten times, attending six opening ceremonies, the tenth and 20th-anniversary sessions, the opening of the Parliament building in 2004 and a sitting in Aberdeen for the Golden Jubilee in 2002.
Two of her visits were to the General Assembly of the Church of Scotland, the temporary home of the Scottish Parliament at the Mound in Edinburgh, before its purpose-built chamber was constructed at the bottom of the Royal Mile.
Seven of the visits were to the Holyrood building, which, in 2003, the Queen said would be "rooted in the land of Scotland, in an ancient part of this capital city, dramatically linking this country's future with its past".
At the opening ceremony of the new Scottish Parliament on July 1, 1999, the Queen presented it with a newly-commissioned mace.
This was, she explained, "a modern embodiment of an ancient symbol of power, legitimacy and the relationship between parliament and Crown".
Designed and crafted by Michael Lloyd, it is made from silver and of gold panned from Scottish rivers, with the inlaid gold band symbolising the relationship between the Parliament, its people and the land.
Engraved on its head are the words wisdom, justice, compassion and integrity – a reference to the ideals that the people of Scotland aspire to for their Members of Parliament.
The founding of the Scottish Parliament is commemorated by the words: "There shall be a Scottish Parliament – The Scotland Act 1998."
A portrait of the Queen, commissioned for the Scottish Parliament's tenth anniversary, hangs in its main hall.
The striking photograph, taken in the Palace of Holyroodhouse across the road, shows the Queen wearing a white gown, pearl earrings and pearl necklace, as well as a thistle shaped diamond brooch that belonged to her grandmother Queen Mary. The picture was taken by Shaun Murawski.
The Scottish Parliament presented the Queen with a Rowan Tree to mark her Golden Jubilee in 2002.
This is planted in the Canongate entrance, close to the Palace of Holyroodhouse.
Speaking at the time, the Queen said she was pleased to accept the gift, adding: “The rowan is the ancient Scottish symbol of privacy, peace and sanctuary.
"In my jubilee year, I trust that all the people of Scotland will enjoy those blessings.
"The Duke of Edinburgh and I have many vivid and happy memories from the past 50 years of the warmth, honesty and humour of the Scottish people.
"Your society has given so much to the world. I particularly value your commitment to community, learning, the spirit of enterprise and equality of opportunity for all.”
The Motion of Condolence in the Scottish Parliament will read: "That this Parliament expresses its deepest regret and grief at the death of Her Majesty The Queen; conveys its sincere condolences to His Majesty The King and other members of the Royal Family in their bereavement; affirms the great affection and esteem in which Her Majesty was held, and expresses gratitude for her life of exceptional public service and her long and close association with Scotland and the Scottish people."
Speaking ahead of the event, Ms Sturgeon said: “For countless people – across our country, and around the world – this is a moment of profound sadness.
"We see that in the crowds gathered outside here, at St Giles’ Cathedral, and all across Scotland. This Parliament and this nation are in mourning today.
“At the heart of it all, of course, is the sense of loss felt by those who were closest to Her Majesty.
"Our thoughts are with the entire royal family – and we are honoured by the presence here, of His Majesty, King Charles III, and The Queen Consort.
“In an ever changing world, especially in turbulent times, Her Majesty was the great constant - the anchor of our nation.
"Even towards the end, as her health declined, her genuine love of Scotland and profound sense of public service never faltered.
“She performed her duties with dedication and wisdom, setting an exceptional example to each and every one of us.
"We stand ready to support His Majesty as he continues his own life of service and builds on the extraordinary legacy of his beloved mother Queen Elizabeth - the Queen of Scots.”