LONDON — Britain’s Prince Philip left a London hospital Tuesday after being admitted four days earlier for what the palace called a preexisting condition.

Photos and video showed Queen Elizabeth II's 98-year-old husband walking out of the hospital just before 9:00 a.m. (4 a.m. ET) wearing a dark blazer, white shirt and light blue tie. He shook hands with a member of the hospital’s staff before climbing into a car.

The prince was discharged by his doctor and then went to Sandringham, in the east of England, Buckingham Palace said in a statement. The queen spends Christmas with her family at her country home in this village each year.

Philip, whose official title is the Duke of Edinburgh, walked into King Edward VII Hospital on Friday as a precautionary measure, according to the palace, which declined to give details about his condition or treatment.

On Monday, his son, Prince Charles, said that he was “being looked after very well in hospital.”

"Once you get to 98 things don't work so well," he added.

It is not known yet if Philip will go to a Christmas morning church service traditionally attended by the queen and other senior royals.

Church is usually followed by a family lunch at Sandringham and then the broadcast of the queen's pre-recorded message to Britain and the Commonwealth countries. Excerpts released ahead of time reveal the queen plans to admit it has been a “bumpy” year.

Philip officially retired from public royal duties in August 2017, at the age of 96.