LONDON (AP) — Britain’s Prince Philip returned to Windsor Castle on Tuesday, following a month in the hospital during which he was treated for an infection and underwent a heart procedure.

Philip, 99, the husband of Queen Elizabeth II, was admitted to the private King Edward VII’s Hospital in London on Feb. 16, where he was treated for an infection.

He was later transferred to a specialized cardiac care unit at St. Bartholomew’s Hospital, before returning to King Edward VII’s.

Photographers standing outside the door of the private hospital captured his departure in the back of a black car. Buckingham Palace later issued a statement confirming Philip's release.

"His Royal Highness wishes to thank all the medical staff who looked after him at both King Edward VII’s Hospital and St Bartholomew’s Hospital, and everyone who has sent their good wishes,'' the palace said in a statement.

Philip’s illness is not believed to be related to COVID-19. Both Philip and Elizabeth received coronavirus vaccines in January and chose to publicize the matter to encourage others to also take the vaccine.

Philip, also known as the Duke of Edinburgh, retired in 2017 and rarely appears in public. Before his hospitalization, he had been isolating at Windsor Castle, west of London, with the queen.

His illness comes as the royal family has been rocked by an interview with Meghan, Duchess of Sussex, and Prince Harry. In the explosive broadcast, Meghan, who is biracial, said the palace had failed to help her when she had suicidal thoughts and that an unidentified member of the royal family had raised “concerns” about the color of her baby’s skin when she was pregnant with her son, Archie.

The interview, conducted by Oprah Winfrey, divided people around the world. While many say the allegations demonstrate the need for change inside a palace that hasn’t kept pace with the #MeToo and Black Lives Matter movements, others have criticized Harry and Meghan for dropping their bombshell while Philip was hospitalized.

The longest-serving royal consort in British history, Philip married the then-Princess Elizabeth in 1947. He and the queen have four children, eight grandchildren and nine great-grandchildren.

Copyright 2021 The Associated Press. All rights reserved. This material may not be published, broadcast, rewritten or redistributed without permission.