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
-
Ghana’s legal education debate: Are we expecting too much too soon?
22 minutes -
Alcaraz storms through to semi-final with Musetti
34 minutes -
Black Queens wrap up Abidjan training tour with defeat to Côte d’Ivoire
43 minutes -
Inzaghi leaves Inter Milan ‘by mutual agreement’
47 minutes -
‘Man Utd didn’t need the money’ – Fernandes rejects Al-Hilal move
53 minutes -
Cybercrime ringleader, 10 others remanded in custody
56 minutes -
Gov’t to expand student loans to all tertiary institutions – Education Minister
57 minutes -
WaterAid Ghana, Guinness Ghana commission water project in Upper West Region
1 hour -
Energy levy: ‘You can’t continue pouring water into a leaking bucket’ – COPEC warns
1 hour -
Rising Star: Yvonne Dadson’s groundbreaking research earns international recognition
1 hour -
Suicide bomber killed in Uganda on Christian holy day, army says
1 hour -
Journalists urged to champion nutrition and public health advocacy
2 hours -
Mindset Transformation Initiative marks 10 Years since June 3 Disaster, calls for national accountability
2 hours -
Ghana urged to prioritise maternal mental health amid rising postpartum depression cases
2 hours -
High Court showdown: Bright Simons demands 38-fact admissions of Ibrahim Mahama
2 hours