Although Prince Philip was not immediately discharged and he spent a second night at the hospital, his condition was not as grave as feared and he was able to leave the medical facility on Thursday morning, Reuters reported.
Want to be more digitally savvy and grow your business online?
The illness had forced him to miss the State Opening of Parliament.
Camilla, Duchess of Cornwall, Prince Charles, Prince of Wales, Queen Elizabeth II, Prince Philip, Duke of Edinburgh, Catherine, Duchess of Cambridge, Princess Charlotte of Cambridge, Prince George of Cambridge and Prince William, Duke of Cambridge.
The development comes almost seven weeks after the palace announced that Prince Philip will retire from royal duties from September.
Prince Philip's age would have meant that he struggled to regulate his temperature in the heatwave on Monday, experts have said.
Number of high-rise buildings found to have hazardous cladding rises to 60
The Taplow, Bray and Dorney residential tower blocks on the Chalcots Estate are pictured in north London on June 23, 2017. Areas so far affected include the city of Manchester, Camden, Plymouth, Hounslow, Portsmouth, Barnet and Brent.
Taliban storm Afghan police compound; 1 police dead
USA troops in Afghanistan now number about 8,400, with another 5,000 from North Atlantic Treaty Organisation allies. Troops during a joint operation in the Achin district of eastern Afghanistan , killing three army rangers.
SpaceX launches 10 satellites from California air base
The latest event comprised of 10 new satellites for Iridium that will uplift Iridium's NEXT constellation mission. However, he said, he would want to see whether using a reused first-stage would speed up launch dates.
The palace said he was "in good spirits".
The Duke of Edinburgh, 96, was admitted on Tuesday to seek treatment for an infection.
"Prince Philip will attend previously scheduled engagements between now and August, both individually and accompanying The Queen". Philip is patron of 780 organisations, "with which he will continue to be associated", according to Buckingham Palace.
The 96-year-old royal is said to be in good spirits as he was treated for an infection related to a pre-existing condition.
The Duke once remarked that he roughly follows the Atkins diet, and is said to be an advocate of healthy eating and exercise.