Philip, the Duke of Edinburgh, was admitted on Tuesday to the King Edward VII Hospital in London which is regularly used by the royals.
"The Duke of Edinburgh has undergone a successful hip replacement operation. He is progressing satisfactorily at this early stage," the palace added in a statement.
"His Royal Highness is likely to remain in hospital for several days," it added. "He is comfortable and in good spirits."
He did not accompany the Queen, 91, to a church service at a service last Thursday because of the hip problem, a royal source said last week.
He also missed the Easter Sunday service traditionally attended by the royal family at St George's Chapel in Windsor to the west of London, where his grandson Prince Harry is due to marry U.S. actress Meghan Markle next month.
(Except for the headline, this story has not been edited by NDTV staff and is published from a syndicated feed.)