The King and President Emmanuel Macron clasped hands for 28 seconds as they bid farewell at Windsor Castle during the French leader's state visit.
The moment became particularly poignant when Macron held Charles's hand with both of his during the final moments.
Earlier, the president and his wife had spent private time together laying flowers at Queen Elizabeth II's tomb in the King George VI Memorial Chapel within St George's Chapel.
It came after Tuesday night's state banquet held in Macron's honour at Windsor Castle.
At the banquet, the French president had paid tribute to the late Queen, telling guests: "To you she was your Queen, to us she was the Queen."
Queen Camilla and Brigitte Macron joined their husbands for the farewell ceremony, exchanging goodbye kisses with both men. The foursome posed for photographs before parting company.
Garden tour and gifts
The King and Macron had earlier enjoyed a walk around the castle's gardens, with Charles showing his guest areas of work on nature restoration and biodiversity.
State visits traditionally feature an exchange of gifts, and Charles presented the president with an oak sapling for the garden of the French residence in London during the tour.
Charles, a keen watercolourist, also gave the president a set of 12 placemats featuring scenes from Scotland and France he had painted, plus a 1931 edition of John Florio's translation of works by French Renaissance philosopher Michel de Montaigne.
In return, Macron gave the King a copy of the original piano and vocal score of Pelleas et Melisande by Debussy and a Sennelier watercolour set in an inscribed walnut case. Other gifts included a trumpet made by Couesnon from the cavalry band of the French Republican Guard and a hamper of produce from the Elysee Palace, including honey from the palace beehives.
The two men appeared engrossed in their tour as Camilla and Brigitte Macron were left waiting for their husbands to view items from the royal mews.
A charabanc carriage, gifted to Queen Victoria by King Louis-Philippe of France in 1844, was waiting at the end of the Long Walk alongside Fabuleu de Maucour, a 10-year-old dapple grey horse given by the president to the late Queen in 2022 to mark her Platinum Jubilee.
When the men finally arrived, kisses were exchanged but with Camilla due to visit Wimbledon and the royal couple attending a Buckingham Palace event, the Queen patted Charles in an apparent bid to hurry him along and keep him on schedule.
(PA/London) Note: This article has been edited with the help of Artificial Intelligence.