Buckingham Palace says he is in good spirits and is expected to be in the London Clinic for up to two weeks after surgery on Friday.
The 91-year-old was admitted to the clinic, a private hospital and longtime favourite for the royals, after attending a garden party at Buckingham Palace. Philip appeared relaxed as he mingled with guests and told jokes at the party.
Officials have not released details about his condition but indicated he had had tests earlier in the week.
He had pulled out of one event this week but later attended a service at Westminster Abbey to mark the 60th anniversary of the coronation of his wife, Queen Elizabeth II.
Also on HuffPost