Prince Philip, 99, in 'Good Spirits' as He Returns to Windsor Castle After Month in Hospital

DANIEL LEAL-OLIVAS/AFP via Getty Images Prince Philip leaves the hospital on Tuesday

Prince Philip is recuperating at home after four weeks in the hospital.

The Duke of Edinburgh, 99, returned to Windsor Castle to be reunited with wife Queen Elizabeth on Tuesday morning. He is said to be "in good spirits," a royal source tells PEOPLE.

In a brief statement to PEOPLE confirming he was back home at the castle, a 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."

Philip was admitted to London's King Edward VII hospital on Feb. 16, and then in March, he was transferred to St. Bartholomew's hospital for more tests and treatment for what was said to be a pre-exisiting heart condition. He eventually underwent an operation, the palace said.

RELATED: Princess Eugenie Shares Sweet Story Behind Son's Name — Which Includes Tribute to Prince Philip

PA Images Prince Philip

News of his discharge from the hospital first became apparent when extra police presence and activity around the King Edward VII hospital were spotted early on Tuesday. He was then pictured in the back of a BMW car as he set off for his 30-mile journey west to Windsor.

His arrival back at the castle will be a great support for the Queen, 94, who has endured a testing few weeks, as bullying allegations swirled at the palace and her grandson Prince Harry and Meghan Markle gave their stunning interview to Oprah Winfrey.

The fallout from the interview is still being felt around the palace, and insiders say the Queen would have found some of the days she coped with the ongoing allegations as "lonely" without the man she calls her "strength and stay."

Max Mumby/Getty Prince Philip

RELATED: Prince Harry Addresses 'Hurt' with Prince Charles and Prince William — and His Close Bond with Queen Elizabeth

The Queen will now be focused on ensuring that Philip has what he needs to recover. The family will celebrate his 100th birthday on June 10, and are also looking ahead to the Queen's 95th birthday next month, and the official marking of the monarch's birthday on June 12 with the annual Trooping the Colour military ceremony.

The Queen has kept working throughout her husband's hospital stay as she has continued her regular video calls with various charities and organizations like she did recently with a group of scientists and students to celebrate STEM endeavors across the U.K.

Buckingham Palace Queen Elizabeth

Philip is known to have had only one visitor from his family during the month-long stay. His eldest son Prince Charles, 72, traveled from his home in Gloucestershire, England, to visit him in his first weeks of treatment.

Can't get enough of PEOPLE's Royals coverage? Sign up for our free Royals newsletter to get the latest updates on Kate Middleton, Meghan Markle and more!

During a recent visit to a COVID-19 vaccination center in Croydon, South London, on Wednesday, Camilla, Duchess of Cornwall, 73, gave an update on Phillip's condition, saying that he was "slightly improving" but he "hurts at moments," ITV news reported.

"We keep our fingers crossed," she continued.