Her Majesty the Queen’s ties with Scotland were in her DNA, as she was descended directly from James VI of Scotland through her father King George VI.
Meanwhile, on her mother’s side, she could trace her ancestry through generations of Scottish nobility back to the 14th century and Sir John Lyon, Thane of Glamis, who married King Robert II’s daughter.
And Glamis Castle was the ancestral home of the Queen Mother, as well as being the birthplace of the Queen’s sister, Princess Margaret, who was the first royal baby to be born in Scotland since 1600.
During childhood and throughout her reign the Queen spent plenty of time in Scotland, using the ancient royal palace of Holyroodhouse when in residence in Edinburgh.
But she had particular affection for her beloved family home of Balmoral, in Aberdeenshire, which was created by Queen Victoria and Prince Albert as the royal family’s private retreat.
She was also said to be particularly fond of the the Royal Yacht Britannia which she launched at John Brown’s shipyard in Clydebank on April 16, 1953.
The boat was used for many trips around the world until it was decommisioned in 1997, later becoming a tourist attraction in Edinburgh’s Leith.
Here are 22 pictures of some of the Queen’s visits to Edinburgh through the years.
Read more:

9. Ceremonial robes
The Queen and Duke walk to the Signet Library from St Giles' Cathedral after a service during the coronation visit in 1953. Photo: Unknown

10. On parade
The Royal Party cross the road to the Saluting Base prior to the British Legion Parade at King's Park, Holyrood House, in 1946. King George VI is pictured with Queen Elizabeth and the then Princess Elizabeth in the centre. Photo: PA

11. King and Queen
The Duke of Edinburgh, Queen Elizabeth II and King Olav of Norway at the gala performance of the play 'Rob Roy' in the Lyceum Theatre during the King's state visit in October 1962. Photo: Unknown

12. Signing in
Queen Elizabeth II signs the visitors' book of Edinburgh's Loretto School in July 1958. Photo: Unknown