Video report by ITV News Royal Editor Chris Ship
Prince Philip has left hospital after being admitted for "treatment relating to a pre-existing condition".
The 98-year-old spent four nights at the King Edward VII’s Hospital in central London.
The Duke of Edinburgh was seen leaving hospital on Tuesday morning just before 9am and walked unaided to a car, which was waiting for him in a secluded seat behind the hospital.
He was seen climbing into the car and sitting in the front passenger seat, as he was driven away.
The duke arrived at Sandringham by helicopter just before 10am and he will spend Christmas Day with the Queen and other members of the royal family at Sandringham.
In a statement, Buckingham Palace said: "His Royal Highness would like to thank everyone who sent their good wishes.”
The Duke’s planned admission on Friday to the private central London hospital, which has been treating members of the royal family for decades, was described as a “precautionary measure” by Buckingham Palace.
During a visit to flood-hit communities in South Yorkshire on Monday, Prince Charles was asked about his father’s health by a reporter.
“He’s being looked after very well in hospital,” he replied.
“At the moment that’s all we know.”
During the visit, a woman in Fishlake asked Charles: “Sir, how is your father?”
He replied: “Alright. When you get to that age things don’t work so well.”
The Queen did not change her Christmas schedule as a result of her husband’s hospital stay.
She left Buckingham Palace for Norfolk by train on Friday to begin her traditional festive break at her private Sandringham estate, where the Duke spends much of his time since retiring from public duties.
On Sunday the Queen attended church, accompanied by Sophie, the Countess of Wessex.
The Duke, who turned 98 in June, has generally enjoyed good health, appearing to recover well from a planned hip replacement operation in April 2018.
Philip escaped with minor injuries after adramatic car crash near Sandringham in January, but in the past decade has been admitted to hospital for abdominal surgery, bladder infections and a blocked coronary artery.
A Buckingham Palace statement on Friday said: “The Duke of Edinburgh travelled from Norfolk this morning to the King Edward VII Hospital in London for observation and treatment in relation to a pre-existing condition.
“The admission is a precautionary measure, on the advice of His Royal Highness’s doctor.”
Philip was not taken by ambulance and was expected to be in hospital for a few days.
He is known for his “no fuss” approach and is unlikely to receive many visitors while he is being treated at the hospital.
Buckingham Palace would not go into details about Philip’s pre-existing condition, or the nature of his treatment, but there is likely to be concern for the Duke among well-wishers given his age.
Philip’s decision to retire from public duties during 2017 was not health-related, Buckingham Palace said at the time of the announcement.
The Duke is an advocate of healthy eating combined with exercise.
He once said he more or less followed the Atkins diet and he drinks only moderately.
He has given up riding carriages competitively, but earlier this year was photographed in the grounds of Windsor Castle holding the reins as he guided a horse and carriage through the estate.