The Queen has begun a week-long stay in Scotland marking her Diamond Jubilee with a visit to Edinburgh's newly-refurbished Scottish National Portrait Gallery.
The monarch, who is in residence at the city's Holyrood Palace for the annual Royal Week, toured the gallery, which is home to a collection of world-renowned paintings.
The building, which reopened in December 2011 following a £17.6 million restoration project, houses works by some of the most important artists in history as well as portraits of great Scots. It also contains the world's most comprehensive collection of Scottish art.
Queen Elizabeth II and the Duke of Edinburgh take in the sights at the Scottish National Portrait Gallery in Edinburgh
The Queen and the Duke of Edinburgh were greeted by a large crowd as they arrived at the gallery in the city's New Town.
They were met by Ben Thomson, chairman of National Galleries of Scotland, John Leighton, director-general of National Galleries of Scotland, and Nicola Kalinsky, director of the Scottish National Portrait Gallery, before touring the gallery and meeting with key donors to the refurbishment campaign.
The Queen, dressed in a mint green coat and matching hat, later unveiled a plaque and signed the visitors' book.
On her visit, the monarch was also introduced to Formula One driving legend Sir Jackie Stewart as she previewed a newly-commissioned portrait of the sportsman, depicting him at the height of his racing career.
Commenting after the visit, Ms Kalinsky said: "It has been a huge honour to have the Queen and the Duke of Edinburgh visit the gallery.
"They were very interested in the works we have on display and they were asking a lot of questions about the collection.
"The Queen has paintings by many of the same artists in her own collection and was very knowledgeable."
Earlier, the Queen took part in an ancient ceremony to formally receive her into the City of Edinburgh.
At the annual Ceremony of the Keys, she was handed the keys of the city by the Lord Provost.
Royal Week will see the monarch undertake a series of engagements in Edinburgh, Glasgow and Perth, including events to celebrate the jubilee.
On Tuesday about 8,000 guests will attend a garden party at Holyrood Palace.
Those attending have been advised to take public transport to the event after prolonged wet weather forced the closure of the car park.
On Wednesday, engagements include a jubilee thanksgiving service in Glasgow while Thursday will see members of the royal family attend a Thistle Service at St Giles' Cathedral in Edinburgh at which Prince William will be installed as a Knight of the Thistle.
On Friday, the Queen and Duke visit Perth, which was awarded city status to mark the jubilee.