The Duke of Cambridge told a former comrade of Prince Harry he hoped his younger brother had not given him "lip" when they served alongside each other in Afghanistan.
William made the quip at a reception at Horse Guards Parade for military servicemen and women and civilians who had served in Afghanistan and the two Gulf Wars.
Kailash Gurung, 40, who formerly served in the Royal Gurkha Regiment, met Harry when the prince came to Afghanistan as a forward air controller in 2007.
On learning that Sergeant Gurung had met Harry during a stay at his Afghanistan base, William remarked: "Well I hope he didn't give you any lip!
"Tell him where to go!"
Sergeant Gurung, who is now based in Abingdon, Oxfordshire, as part of the 4 ROC Regiment, said the day had marked a special moment to reflect about friends he lost in the conflict.
He said: "Some of my very close friends lost their lives, some of my very close friends have been injured for life. It's very emotional.
"It has sent me back, made me think about how it happened."
The tightly guarded event, spread across two large, chandelier-lit marquees at the top of St James's Park, hosted hundreds of attendees from the conflicts in Iraq and Afghanistan between 1991 and 2014.
The receptions followed a sombre drumhead ceremony in the parade grounds and the unveiling of a new memorial in the Victoria Embankment Gardens to commemorate those who served in the conflicts, where a total of 682 service personnel lost their lives.
The event has been criticised by some families, who feel all bereaved family members of those lost in the war should have been formally invited.
As William greeted uniformed attendees in the marquee on Horse Guards Parade, the Duchess of Cambridge spoke to former servicemen to ask about their time in the Middle East.