Buckingham Palace has released a statement after Prince Philip has left the King Edward VII’s Hospital in London where he has been recovering from heart surgery.

The Duke of Edinburgh has spent the past month in hospital care after initially being admitted to hospital with an infection.

Police have blocked access for vehicles to the private King Edward VII’s Hospital in central London, where the Duke of Edinburgh has been recovering from a heart procedure, as four officers arrived on motorcycles to join a dozen at the entrance.

READ MORE: 'You could see the THC crystals’ – Cannabis reportedly found in 50 bin bags in quiet village

Hospital staff have set up a white, folding screen next to a black BMW at the rear of the private King Edward VII’s Hospital in London.

Philip has now returned to Windsor Castle and sent a message of thanks to hospital staff.

Bucks Free Press: Prince Philip left hospital on Tuesday. (PA)Prince Philip left hospital on Tuesday. (PA)

In a statement, Buckingham Palace 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.”

It is understood the duke is in good spirits.

He was initially taken by car to the private King Edward VII’s Hospital in central London on February 16, after telling his doctor he felt unwell.

READ MORE: Theatre is 'ready to get back into action' after being shut for one year due to Covid

But two weeks later was moved to St Bartholomew’s Hospital in the City of London by ambulance.

The duke underwent a successful procedure on a pre-existing heart condition at Barts on March 3, just three months before his 100th birthday, before returning to King Edward VII’s a few days later to recuperate and continue his treatment.

The Duke has spent 28 nights as an in-patient – his longest ever stay.