The King has praised a 99-year-old D-Day veteran as a “great example to us all” as he toured a regimental museum in Aberdeen.

During the visit, Charles was shown a family heirloom from the First World War, a kilt worn by a soldier who was wounded so grievously he was declared dead – only for his status to be amended to “wounded in action” the next day.

He viewed the kilt – which is still encrusted with mud from the Somme – as he visited The Gordon Highlanders Museum, which celebrates the story of the British regiment originally raised by the 5th Duke of Gordon in 1784.

As the Duke of Rothesay, Charles was appointed colonel in chief of the regiment in 1978 and remained so until its amalgamation with the Queen’s Own Highlanders in 1994.

Captain Alexander Manson was wounded in the Battle of the Somme and his family have kept his kilt untouched (Andrew Milligan/PA)

After meeting volunteers and seeing new renovations to the museum, the King spoke to former soldiers in the regiment including 99-year-old Jim Glennie.

As an 18-year-old private, he was part of the invasion force which landed at Sword Beach on D-Day.

He was later wounded in action and taken prisoner, spending the remainder of the war in Stalag IV-B.

He and other soldiers made their own way back to Allied lines when their German guards deserted them as the Russians approached from the east.

Upon seeing the King at the museum, Mr Glennie greeted him cheerfully and said “long time no see!”

The King told him about a portrait of Mr Glennie he had been shown at the museum, saying “it looked terrific” and promising to send him a message when he turns 100 in August.

The King said: “You’re a great example to us all, if I may say so, you really are.”

Charles meets staff at the museum during his visit (Andrew Milligan/PA)

Mr Glennie’s son James Glennie Jr said his father had once served Charles’ sister Anne during a dinner at the museum, recalling her laughter when a potato rolled off the table and his father tried to hide it.

The Gordon Highlanders veteran was unable to join last summer’s D-Day commemorations in Normandy.

Earlier, Charles was shown a kilt which was worn by Captain Alexander Manson during the Battle of the Ancre in November 1916, part of the wider Battle of the Somme.

His grandson Sandy Manson explained to the King that Captain Manson had been sent “over the top” on November 13, 1916, and was severely injured by an artillery shell.

His wounds were deemed to be fatal and a notice of his death was even sent home to his family in Scotland on November 18, though to their relief his status was corrected to wounded at 5pm the next day.

The kilt, which is still partially covered in mud, was kept untouched in an attic at the family home for decades but has now been presented to the museum, along with letters written by Captain Manson and the erroneous death notice.

The King meets volunteers at the Gordon Highlanders Museum (Andrew Milligan/PA)

Mr Manson told the PA news agency: “At home we’ve got such a wonderful history of family artefacts, that’s one of the most grisliest, but it tells a story.

“It reminds me how lucky I am to be here.”

He added: “His Majesty is so remarkably interested and informed about the history of the regiment.”

The museum’s chairman Colonel Charlie Sloan said the museum is now the “physical embodiment of the regiment” and the King had “thoroughly enjoyed” his visit.

He said: “While this place still exists, the regiment still exists.”

As the King arrived he was played bagpipe music titled “the Tache” after the nickname of the regiment’s last colonel Sir Peter Graham, who died recently.

The engagement on Monday marks the King’s first visit to the museum since 2011, when he went there after unveiling the Gordon Highlanders statue in the city’s Castlegate.