LONDON (CNN) -- Prince Philip, the 96-year-old husband of Britain's Queen Elizabeth II, was discharged from hospital on Thursday after spending two nights there as a "precautionary measure," Buckingham Palace told CNN.
"I can confirm that the Duke of Edinburgh left hospital this morning," a Palace spokesman told CNN's Max Foster.
The Prince was admitted on Tuesday evening to London's King Edward VII Hospital, where he was treated for an infection arising from a pre-existing condition.
"Prince Philip is in good spirits and is disappointed to be missing the State Opening of Parliament and Royal Ascot," Buckingham Palace said in a statement on Wednesday. The Prince, who has been by the Queen's side for their nearly 70 years of marriage, was absent as the monarch gave her annual speech at the opening of Parliament.
Just one day before being admitted to hospital, the Prince had donned a top hat for the Royal Ascot horse races in Berkshire, England.
The appearance was part of a scaled back schedule for the Prince, who announced last month that he would step down from public life.
"Prince Philip will attend previously scheduled engagements between now and August, both individually and accompanying The Queen," the statement about his retirement read. "Thereafter, The Duke will not be accepting new invitations for visits and engagements, although he may still choose to attend certain public events from time to time."