LONDON—Prince Philip, the husband of Queen Elizabeth II, was admitted to a London hospital Friday “as a precautionary measure,” Buckingham Palace said.

The palace said the 98-year-old Philip was admitted to the King Edward VII hospital for observation and treatment of a pre-existing condition.

“The admission is a precautionary measure, on the advice of his royal highness’ doctor,” the palace said in a statement.

Philip had been at the royal family’s Sandringham estate in eastern England, where the queen and her family usually spend Christmas. The palace said Philip didn’t travel by ambulance and his admission wasn’t an emergency. He is expected to be in hospital for a few days.

The 93-year-old queen travelled to Sandringham from London on Friday morning after attending the State Opening of Parliament in London on Thursday. She did not change her schedule after her husband’s hospital admission, which was planned in advance.

The private King Edward VII hospital in central London has been treating members of the royal family for decades.

Philip, also known as the Duke of Edinburgh, married Elizabeth in 1947 and is the longest-serving royal consort in British history. He and the queen have four children, eight grandchildren and eight great-grandchildren.

A former naval officer and keen polo player, Philip enjoyed robust health well into old age but has had a number of health issues in recent years. He stopped attending public engagements in 2017.

In 2011, he was rushed to a hospital by helicopter from Sandringham after suffering chest pains and treated for a blocked coronary artery.

In 2017, he spent two nights in the King Edward VII hospital and was hospitalized for 10 days in 2018 for a hip replacement.

Philip was forced to give up driving earlier this year, at the age of 97, after smashing into a car while driving a Land Rover near Sandringham in January. Philip needed help to get out of the vehicle but wasn’t injured. One woman in the car suffered a broken wrist.

He still drives a horse and carriage on private land from time to time.