The Duke of Edinburgh, Prince Philip has left King Edward VII's Hospital after his longest ever stay.
A Buckingham Palace spokesperson said: "The Duke of Edinburgh has today been discharged from King Edward VII's Hospital and has returned to Windsor Castle, following treatment for an infection and a successful procedure for a pre-existing condition.
"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."

Earlier, police had blocked vehicle access to the private hospital in central London, where the Duke of Edinburgh had been recovering from a heart procedure.
Four police officers had arrived on motorcycles to join a dozen officers at the entrance of the hospital.
Prince Philip was first admitted to the hospital on February 16, before moving to St Bartholomew's Hospital two weeks later, where he underwent a procedure for a pre-existing heart condition.
He was moved back to King Edward VII's Hospital days later.
The duke spent 28 nights in hospital as an in-patient - his longest ever stay.
The exact reason for his initial admission was not disclosed, but it was not related to coronavirus.
He was visited by his eldest son Charles, the Prince of Wales, who made a 200-mile round trip to see his father last month and stayed for around 30 minutes.
The duke, the nation's longest-serving consort who turns 100 in June, left hospital in the back of a black BMW on Tuesday morning.

Prince Philip has been treated for heart problems in the past.
In 2011 the duke was rushed to hospital by helicopter from Sandringham after suffering chest pains as the Royal Family was preparing for Christmas.
On that occasion he was treated for a blocked coronary artery at Papworth Hospital in Cambridgeshire and underwent a minimally invasive procedure of coronary stenting.
He has spent most of lockdown residing at Windsor Castle with the Queen for their safety, alongside a reduced household of staff dubbed HMS Bubble.
The 94-year-old monarch has continued to carry out her official duties by video.
The couple, who have been married for 73 years, received their first Covid-19 jabs in January.
Latest Stories
-
Space scientists reveal shocking devastation of mining as 84,000 football fields of forests gone
1 hour -
Space science under siege: Encroachment threatens research as scientists battle mining devastation
1 hour -
Turkey’s opposition leader vows protests will continue ‘in every city’
2 hours -
Zimbabwe president fires army chief ahead of planned protests
2 hours -
Trump names conservative media critic as US ambassador to South Africa
2 hours -
US officials begin trade talks in Delhi as tariff deadline nears
2 hours -
Niger junta sets out five-year transition to constitutional rule
2 hours -
China tariffs may be cut to seal TikTok sale, Trump says
2 hours -
Militants kill 16 on Nigerian army base, military outpost, security sources say
3 hours -
Trump announces 25% tariffs on car imports to US
3 hours -
Suspect remanded in domestic violence case
3 hours -
Labour, 36, jailed over mobile phone theft
5 hours -
Mahama likely to assent to E-Levy repeal bill on Thursday – Deputy Finance Minister
5 hours -
Repealing of E-Levy is a positive sign – Ken Ashigbey
6 hours -
After many years in Nollywood, I’m still not a rich man – Jide Kosoko
6 hours