The Queen appeared in good spirits as she made a second public outing in Edinburgh this week. Her Majesty joined the Armed Forces at the Palace of Holyroodhouse, her official royal residence in Scotland, as they celebrated her Platinum Jubilee.
As head of the Armed Forces in the UK, the monarch watched as the army, navy and the air force took part in a parade in the palace gardens.
READ: Royal fans all saying same thing about the Queen's appearance in Scotland
WATCH: The Queen in high spirits as she makes second public outing in Scotland
A royal salute was given as the Queen made her entrance. Lord Lyon, King of Arms, then presented three senior representatives from the services to Her Majesty.
READ: The Queen's secret £20k upgrade to Balmoral home ahead of her summer visit
READ: Prince William's hilarious childhood nickname for the Queen revealed
The Queen attended the parade in Edinburgh
They were joined by three cadets, representing each service, who paraded the key to Edinburgh Castle across the gardens before presenting it to Major General Alastair Bruce of Crionaich, Governor of Edinburgh Castle.
In keeping with tradition, the Major General then addressed the Queen, 96, saying: "We, the serving members of Your Majesty's armed forces, bound by our oath to you, your heirs and successors, offer for your gracious acceptance the key to Your Majesty's Royal Castle of Edinburgh."
The Queen greeted members of the Armed Forces
The Queen responded: "I return this key to the safekeeping of My Governor of Edinburgh Castle, in gratitude for the symbolic act of loyalty of our armed forces, confident of your faithful allegiance to your oath."
The monarch is marking Holyrood Week, also known as Royal Week, in Scotland until Friday and has been joined by other members of her family on her annual trip.
READ: Sophie Wessex rocks the hat royal ladies have been loving
The key to Edinburgh Castle was paraded in front of the Queen during the ceremony
On Monday, she stepped out with the Earl and the Countess of Wessex for the Ceremony of the Keys, which took place on the forecourt of Holyroodhouse. The Queen was symbolically handed the keys of the city by the Lord Provost and tradition dictates she then returns them, entrusting their safekeeping to Edinburgh's elected officials.
Later on Tuesday, her daughter Princess Anne will conduct an investiture on her behalf, again at Holyroodhouse.
The Queen looked lovely in lilac at the engagement
Make sure you never miss a ROYAL story! Sign up to our newsletter to get all of our celebrity and royal news delivered directly to your inbox.