London (AFP) - After a lifetime of public service by the side of his wife Queen Elizabeth II, Prince Philip will finally retire on Wednesday at the age of 96.

The Duke of Edinburgh will attend a parade of Royal Marines at Buckingham Palace, the last of 22,219 solo public engagements since she ascended to the throne in 1952.

He has attended countless more events with the queen, now 91, offering his support and livening proceedings with a style of humour that often makes headlines but has eased many an awkward exchange.

Prince Philip will take the salute on Wednesday at the end of a charity challenge by the Royal Marines, in which members ran 1,664 miles (2,678 kilometres) over 100 days to mark the founding of the commando force in 1664.

He has been captain general of the corps since 1953, taking over from the queen's father king George VI, who had died the year before.

The event also honours his military background -- the duke was a naval officer during World War II and was marked out for a glittering career, before he gave it up on becoming the royal consort.

Over the past 65 years, he has carried out 637 visits abroad on his own, given almost 5,500 speeches, and was patron, president or a member of more than 780 organizations.

Related Video:

Watch news, TV and more Yahoo View, available on iOS and Android.

He has a keen interest in scientific and technological research, was an early champion of the conservation movement, and his youth scheme the Duke of Edinburgh's Award has extended across the world.

"He may miss the activity, because he's been the busiest royal. Every year, he and (his daughter) Princess Anne vie to which of them does more," one of his biographers, Gyles Brandreth, told BBC radio.

While Prince Philip's life had not turned out as expected, Brandreth said the duke once told him: "I tried to make the best of it... I had to try to support the queen as best I could, without getting in the way."

A palace spokeswoman said his individual programme of public events had come to an end, but "he may choose to attend engagements alongside the queen from time to time".

Story continues

- 'Experienced plaque-unveiler' -

The queen once described her husband of almost 70 years as "my strength and stay".

Announcing his plans to retire in May, Philip joked that he was the "world's most experienced plaque-unveiler".

The prince's sense of humour has got him into trouble in the past, making headlines for politically incorrect jokes.

But he uses it to break the ice, and many view it as a welcome contrast to the queen's more formal reserve.

"How do you keep the natives off the booze long enough to get them through the test?" he once asked a driving instructor in Scotland.

Gruff in public -- he hates media interviews -- he is also widely credited for keeping his family together during the turmoil of his children's divorces and the death of Diana, princess of Wales.

Prince Philip is still in good health for a man of his age, although he was hospitalised for two nights in June for an undisclosed infection.

He and the queen have scaled back public duties in recent years, handing responsibilities to the younger royals, including heir-to-the-throne Prince Charles, and his eldest son Prince William.

William, the 35-year-old Duke of Cambridge, ended his two-year career as an air ambulance pilot last week to turn his full attention to royal duties, alongside his wife Kate.

But while the queen supports her husband's decision to retire, experts say she considers her own vow at her 1953 coronation to serve for life as unbreakable.

"Her Majesty will continue to carry out a full programme of official engagements with the support of members of the royal family," the palace said earlier this year.