Get breaking news alerts and special reports. The news and stories that matter, delivered weekday mornings.

Prince Philip, the 96-year-old husband of Britain's Queen Elizabeth, bowed out of public life on Wednesday with a final solo appearance at an official event, ending a royal career marked by occasional gaffes that landed him in hot water.

Though known for often off-color comments that seized the headlines, Philip has been by the queen's side throughout her 65 years on the throne and she has described him as "my strength and stay."

PHOTOS: At the Queen's Side: Prince Philip Through the Years

He announced his retirement in May this year, after completing more than 22,000 solo appearances, spanning seven decades. At an engagement on the day of the announcement, a guest had told Philip he was sorry to hear he was standing down.

"I can't stand up much," quipped the prince.

Let our news meet your inbox. The news and stories that matters, delivered weekday mornings. This site is protected by recaptcha

Both the queen and Prince Philip have cut their workload in recent years, passing on many responsibilities to son and heir Prince Charles, and grandsons, Princes William and Harry.

Britain's Prince Philip talks to soldiers. Hannah McKay / AFP - Getty Images

Philip spent two days in hospital in June for treatment for an infection. The queen, the world's longest-reigning living monarch who celebrated her 91st birthday in April, will continue to carry out a full program of official engagements.

Philip married Elizabeth at Westminster Abbey in 1947, and the couple are due to celebrate their 70th wedding anniversary in November.

Outspoken, irascible and intensely private, Philip, a Greek-born former naval officer, developed a reputation for occasional brusque and sometimes politically incorrect comments at ceremonial events he attended.

A stray remark about "slitty eyes" during a visit to China in the 1980's became symbolic of his gruff and often unguarded manner.

During a visit to Oban in Scotland in 1995 he asked a driving instructor: "How do you keep the natives off the booze long enough to pass the (driving) test?"

Well into his 90's, he made headlines when he exasperatedly swore at a photographer at a 2015 event.

Britain's Prince Philip walks along the Parade. Yui Mok / Pool via AFP - Getty Images

Nonetheless, the queen has described him as a crucial figure during her long reign.

"He has, quite simply, been my strength and stay all these years," Elizabeth said in a rare personal tribute to Philip made in a speech marking their 50th wedding anniversary in 1997.

For his final solo appearance on Wednesday, Philip, also known as the Duke of Edinburgh, will attend a parade of Royal Marines at Buckingham Palace and meet servicemen who have taken part in a 1,664 mile race to raise money for the Royal Marine's Charity.

Buckingham Palace has said that Philip may choose to accompany Elizabeth at certain events in the future.