Philip, aged 99, was discharged “following treatment for an infection and a successful procedure for a pre-existing condition”, said Buckingham Palace in a statement.
The statement expressed thanks to all the medical staff who looked after Philip “and everyone who has sent their good wishes”.
Local media said this was Philip’s longest-ever stay in hospital – 28 nights in total.
Philip, who turns 100 in June, was treated at two hospitals in London separately for his heart condition and infection.
The exact reason for his initial admission was not disclosed, however, according to Buckingham Palace, the health condition was not related to coronavirus. He was first admitted on February 16, 2021, as a “precaution” after feeling unwell.
READ ALSO Prince Philip’s Heart Surgery Successful – Buckingham Palace
Prince Charles visited his father in the hospital last month and spent about 30 minutes with him.
Philip retired from public duties in 2017 and rarely appears in public. He has been staying with Queen Elizabeth II at Windsor Castle since COVID-19 restrictions were first introduced in the country last year.
Last month, Buckingham Palace confirmed the Queen and Philip had both received their first dose of a coronavirus vaccine.
To bring life back to normal, countries such as Britain, China, Germany, Russia, and the United States have been racing against time to roll out coronavirus vaccines.