The Duke of Edinburgh has retired from official royal engagements in his own inimitable style by joking with Royal Marines they should be "locked up" for their madcap fundraising efforts.
As a former Royal Navy officer Philip's last public solo event, after more than 65 years championing his own causes and charities, fittingly featured men from the Royal Marines, an integral part of the Navy.
But from the demeanour of the Queen's Consort you would never have guessed he was retiring after carrying out 22,219 solo engagements since 1952.
He waved warmly to the crowds, acknowledging their cheers and was described as "chirpy" by a senior officer.
Wearing a bowler hat and rain coat the Duke did not let a heavy downpour affect his final day which was staged in Buckingham Palace's forecourt.
The event marked the end of the 1664 Global Challenge, which recognises 1664, the year the Royal Marines were founded, and has seen marines push themselves to the limit with a series of physical exploits in aid of the Royal Marines Charity.
The Duke, who is the Captain General of the Royal Marines, met Corporal Will Gingell, 33, and Corporal Jamie Thompson, 31, who have run 1,664 miles over 100 days.
He also chatted to Sergeant Matt Burley, a physical training instructor, who swam 1,664 lengths underwater over 10 days and Lieutenant Colonel Aldeiy Alderson, who ran 100 kilometres in 12 hours wearing his Royal Marines uniform and polished boots.
Looking at the group of marines he made them laugh with the quip: "You all should be locked up."
The Queen's Consort announced in May he would be retiring from royal engagements, a decision which was fully supported by the Queen and was not medically related.
Buckingham Palace has stressed, although the Duke's diary of engagements has come to an end, he may decide to attend certain events, alongside the Queen, from time to time.
The Queen's public schedule continues as normal but other members of the Royal Family will step up in support of the monarch in her role as head of state.
Prime Minister Theresa May tweeted a tribute to the Duke praising his public service over the decades.
She said: "As he carries out his final public engagement, I thank The Duke of Edinburgh for a remarkable lifetime of service."
Adding in a second Tweet: "I hope The Duke, after 22,219 solo engagements since 1952, can now enjoy a well-earned retirement!"
Despite the formality of the occasion with a Royal Marines guard of honour giving the Duke a royal salute and the national anthem observed, it had a relaxed feel.
The Band of HM Royal Marines, Plymouth played the Sir Rod Stewart hit I Am Sailing and Philip shared a laugh when he stopped to talk to veterans from the Royal Marines Association and 30 members of RM cadet units from across the country.
The Duke was wearing his Royal Marines tie and it is thought his large collection of 17 medals and military honours under his raincoat, including his War Medal (1939-1945) with Mention in Dispatches, Atlantic Star, Africa Star, Burma Star, (with Pacific Rosette) and Italy Star.
Lieutenant Colonel Gary Green, who devised the 1664 Global Challenge, said: "He was really surprised at the two guys who have run 1,664 miles but he was very chirpy and, as always, really interested in what the Corps does.
"He loves the fact that Royal Marines, when they do something, they do something that's a little bit extraordinary, and the guys come up with these really weird and wonderful and extraordinary challenges and it makes him sort of, certainly on this occasion, chuckle."
He added: "This day is hugely historic when you look back at when the Duke became Captain General in 1953, 64 years later this is his last (solo) event in public."
Cpl Gingell and Cpl Thompson formally ended their epic 1,664-mile run by presenting the Duke with the 1664 Global Challenge baton that had travelled with them around the country.
Philip joked about the weather they had faced during their trek according to Cpl Gingell who said: "The Duke said did I have rain running down my back and we replied we've run in worse weather than this."
He added: "I think he was pretty upbeat, considering the weather and considering he's 96. He was chatty, he seemed happy to be there and was interested in what we'd done."
Cpl Thompson said the Duke was amazed by their efforts: "He pretty much thought we were mad for running that distance."
At the end of the ceremony the Duke took off his bowler hat to acknowledge a march past by Royal Marines who had taken part in the fundraising challenge that organisers hope will raise around £100,000.
And he was given three cheers by the men before the military band played For He's A Jolly Good Fellow.
The Day ended with Philip walking towards an arch that led to the palace's inner quadrangle, but there was time to wave to the crowds who cheered and applauded as he strode away, and a few moments to quiz a Royal Marine at the very end of the guard of honour.