Queen Elizabeth II's 99-year-old husband Prince Philip left a central London hospital on Tuesday, after four weeks of treatment that sparked fears for his health.

The Duke of Edinburgh, as he is formally known, was seen leaving the private King Edward VII's Hospital in the back of a black BMW car, wearing a white shirt and a yellow jumper.

Buckingham Palace confirmed his discharge and said he had returned to Windsor Castle, west of London, where he had been isolating with the queen, 94, since the start of the coronavirus pandemic last year.

Royal aides said he had been treated for an unspecified infection and had "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," a statement from the palace said.

Britain's Prince Philip was first admitted to hospital on February 16 after he complained of feeling unwell
Britain's Prince Philip was first admitted to hospital on February 16 after he complained of feeling unwell AFP / DANIEL LEAL-OLIVAS

The prince, who turns 100 in June, was said to be in good spirits.

His eldest son, the queen's heir Prince Charles, said he was "thrilled" that his father had now left hospital.

Charles, 72, visited the duke last month, but said nothing to the waiting media.

On a visit to a coronavirus vaccination centre in north London on Tuesday, he said he had "spoken to him several times".

Queen Elizabeth II's husband Prince Philip leaves hospital
Queen Elizabeth II's husband Prince Philip leaves hospital AFPTV / Mathilde BELLENGER

Prince Philip's month-long stay at King Edward VII's Hospital and the state-run St Bartholomew's, also in London, is his longest stint in hospital.

The duke was transferred to a specialist cardiac unit at St Bartholomew's hospital for a heart procedure before returning to the private hospital on March 5.

He was first admitted on February 16 on the advice of his doctor after he complained of feeling unwell.

Buckingham Palace said initially that he was expected to stay there for a "few days", but stressed his illness was not related to Covid-19.

Concerns for Philip's health have been high not just because of his age
Concerns for Philip's health have been high not just because of his age AFP / JUSTIN TALLIS

Both he and the queen, whose age puts them among the highest risk of coronavirus, had received the first dose of a Covid vaccine in January.

Later, the palace said he was being treated for an infection, without specifying further.

In the run-up to Christmas 2011, Philip was taken to hospital by helicopter after suffering chest pains.

The Greek-born former naval officer was then treated for a blocked coronary artery and had a stent fitted.

Concerns for his health had been high not just because of his age.

His stint as an in-patient came amid the build-up to a landmark interview by his grandson Prince Harry and Harry's wife, Meghan, during which they accused the royal family of racism.

The couple, who stepped down as working royals last year, told US chat-show host Oprah Winfrey they were asked by one royal what colour their son's skin would be.

Winfrey said Harry had told her later it was not the queen or her husband.

But the claims have prompted an internal investigation, with indications the royal family disputes events.

The queen said "some recollections may vary", over how Harry and mixed-race Meghan were treated before they left for North America.

Harry's brother Prince William last week sought to douse the controversy, telling reporters: "We're very much not a racist family."

Royal commentators said the timing of the interview was poor given Prince Philip's health.