Charles, 75, asked to stay later at the garden party in order to speak to as many of the 8,000 guests as possible.
The monarch and his wife, Camilla, 76, were joined by the Duke and Duchess of Edinburgh for the soiree at the King's official Scottish residence on Tuesday.
You may also like
Camilla and Sophie matched in blue ensembles while Charles and his brother, Edward, donned morning suits and top hats.
Watch their glamorous arrival in the video below…
The guests included a four-legged friend and the first Lady High Constables in 800 years at the Palace of Holyroodhouse.
The garden party comes after the King was officially welcomed to Scotland during the Ceremony of the Keys before he hosted an investiture. Meanwhile, the Queen hosted a reception to celebrate those who work to promote Scottish Literacy.
Take a look at all the best photos from the garden party…
1/11
Royal entrance
The King and the Queen and the Duke and Duchess of Edinburgh stood on the steps for the national anthem as they arrived.
2/11
Garden party attire
As a sign of respect, Charles removed his top hat during the national anthem. Camilla looked elegant in a turquoise Fiona Clare coat dress with a matching wide-brimmed hat by Philip Treacy and cream gloves.
3/11
Four-legged friend
The King stroked Kratu – a rescue dog from Transylvania – and his owner, Tess Eagle Swan, for whom he acts as an Autism support dog. Tess said that the pooch has transformed her life and "taught me love" as a therapy dog.
4/11
History-makers
Charles also met Dr Belinda Hacking, 52, an NHS psychologist and Mrs Victoria Webber, 42, an NHS breast surgeon, who are the first Lady High Constables in 800 years at the Palace.
Created in the early sixteenth century to protect the Monarch in residence at Holyrood, as well as to guard the Palace and the Abbey they enforce law and order within the precincts of the Palace and the Holyrood Abbey Sanctuary and are said to be the oldest statutory police force in the world.
5/11
"Absolute honour"
Dr Hacking said it was "an absolute honour" to become the first women to take on the now ceremonial roles, while Mrs Webber added: "People have been really intrigued and interested. It's a ceremonial role and we have our day jobs but it's been wonderful so far and a huge honour to be here with Their Majesties today."
6/11
Sentimental accessories
A closer look at the Queen's outfit from the garden party – including Queen Mary Diamond's Thistle brooch, which dates back to the 1920s.
7/11
The Duchess of Edinburgh's garden party look
Sophie, 59, looked beautiful in a pale blue Roland Mouret dress with bow detailing on the shoulder and a grey metallic clutch bag from Sophie Habsburg.
8/11
All in the details
Sophie wore her blonde locks in an updo with a Jane Taylor hat and diamond earrings.
9/11
Sartorial choice
And did you spot Prince Edward's frog-print tie? He has quite a collection of novelty ties!
10/11
Hosting duties
The King, who is still undergoing cancer treatment, was on fine form as he joked and laughed with guests.
11/11
Holyrood Week
On 3 July, the King and Queen will be joined by the Prince of Wales, whose Scottish title is the Duke of Rothesay, at the Thistle Service at St Giles’ Cathedral, where Camilla and Edward will be appointed to the Order of the Thistle.
Charles and Camilla will round off the trip by joining a celebration with various performers, guests and organisations at Edinburgh Castle to mark the city’s anniversary. This year's events are reduced in size due to the General Election called for 4 July.
LISTEN: Inside Royal Ascot
Sign up to HELLO! Daily for all the latest and best royal coverage
By entering your details, you are agreeing to HELLO! Magazine User Data Protection Policy. You can unsubscribe at any time. For more information please click here.