The Duke of Edinburgh is on the mend!

Prince Philip was unfortunately in ill health and hospitalized in London on Tuesday, June 20, with an infection, but he has since been released after a two-night-long stay.

"I can confirm that The Duke of Edinburgh left hospital this morning," a spokesperson for Buckingham Palace told CNN on Thursday, June 22. According to E! News, he left the hospital through a private exit and is now resting at Windsor Castle. We're so glad to hear he's feeling better!

prince philip getty images

Prince Philip missed out on supporting his wife, Queen Elizabeth, at the State Opening of Parliament on Wednesday, June 21, at the House of Lords in the British capital.

The 96-year-old Duke's eldest son, Prince Charles, stepped in on behalf of his father as Her Majesty delivered her annual Queen's speech.

MORE: Find out the Fascinating Reason Why Prince Philip Isn't King!

A statement from Buckingham Palace at the time explained: "The Duke of Edinburgh was admitted to King Edward VII Hospital in London last night, as a precautionary measure, for treatment of an infection arising from a pre-existing condition."

prince philip getty images

Queen Elizabeth and Prince Philip in 2014.

"Prince Philip is in good spirits and is disappointed to be missing the State Opening of Parliament and [the remainder of] Royal Ascot," the message continued. "The Prince of Wales will accompany The Queen to the State Opening. Her Majesty is being kept informed and will attend Royal Ascot as planned this afternoon."

While the palace wouldn't confirm his exact medical illness, royal insiders have told the UK press that the father-of-four is "up and about and is in good spirits."

MORE: Prince Harry Looks Crazy Similar to His Grandfather, Prince Philip, in This 1957 Photo!

In May, it was confirmed The Queen's right-hand man was stepping down from his royal duties. In a statement, the palace said that Philip would not be accepting new invitations for visits and engagements, although "he may still choose to attend certain public events from time to time."

The Duke is considered one of the hardest-working royals and conducted 110 days of appearances last year — outnumbering several young family members, including Prince William.

Dubbed "the original James Bond," the Duke has had good health over the years but was hospitalized in 2012 during the Queen's Diamond Jubilee from a bladder infection. In 2011, he underwent treatment for a blocked coronary artery and over the most recent Christmas holidays, he and The Queen suffered heavy colds.

MORE: Prince William's Father's Day Shoutout Slammed by Royal Fans for Excluding Princess Charlotte

Since his retirement, Prince Philip has been spotted on several occasions carriage racing. His last public appearances were at Royal Ascot on Tuesday, June 20 and Trooping the Colour on Saturday, June 17.

Wishing the Duke a very speedy recovery!

Parts of this story originally appeared on NowToLove.com.

More From Closer Weekly

What Is the British Royal Family's Last Name?

Tom Cruise and Prince Philip Meet at Buckingham Palace — See the Pics!

What Is the British Royal Family's Net Worth?