LONDON — The 96-year-old husband of Queen Elizabeth II is recovering after undergoing a successful hip replacement operation Wednesday, Buckingham Palace said.

The palace said Prince Philip is “progressing satisfactorily at this early stage” and is likely to spend several days at King Edward VII Hospital in London.

He is said to be “comfortable and in good spirits.”

Philip had suffered from hip pain in recent weeks. Before he went into the hospital on Tuesday, he missed a number of family events, including an Easter church service with the queen and other members of the royal family.

The British Orthopedic Association said Philip’s surgery was necessary because he was suffering from osteoarthritis.

“At the age of 96, there are slightly greater risks, but he will be looked after by an extremely skilled team,” Ananda Nanu, the board’s president, said.

Philip was an avid sportsman for many years and saw active duty in the Royal Navy during World War II. He has supported many charities, including the Duke of Edinburgh’s Award, which he founded in 1956. The charity has been active in over100 countries and has helped thousands of youths.

Philip announced his retirement from royal duties in May He and Queen Elizabeth recently celebrated their 70th wedding anniversary.