Prince Philip had to reluctantly bow out of official duties earlier this week after doctors advised him to stay at home. On Wednesday, however, the Duke was well enough to carry out an engagement alongside his wife the Queen.
The Prince, 94, was on hand to welcome the President of Germany Joachim Gauck to Buckingham Palace.
A photo from the royal family's official Twitter account was posted online, showing the trio chatting.
Prince Philip and the Queen welcomed the President of Germany Joachim Gauck to Buckingham Palace
The Prince expressed his disappointment at missing the Battle of Jutland memorial service on Tuesday, which Mr Gauck attended.
"I want to apologise for not being there," said Philip.
His daughter Princess Anne, who was already going to the event, represented the royal family.
The Duke apologised for missing the President at an engagement earlier in the week
A service was held at St Magnus Cathedral coupled with an event at Lyness Royal Naval Cemetery on Hoy to mark the 100 year anniversary of the Battle of Jutland – a naval battle in which over 6,000 Britons and 2,500 Germans lost their lives.
A statement from Buckingham Palace read: "Following doctor's advice, the Duke of Edinburgh has reluctantly decided not to attend the commemorations marking the Battle of Jutland in Kirkwall and Hoy. The Princess Royal, who was already attending the events, will represent the royal family."
Philip was not admitted to hospital, and aides said he planned to carry out his other upcoming official duties this week.
Prince Philip recently attended a garden party with his family
The Prince, who turns 95 next week, last had a health scare in 2012. He has recently seemed to be in good health and very much involved with official duties.
He was at the Queen's side during her various 90th birthday celebrations, and last week made the trip to Cambridgeshire to visit the Grafham Water reservoir.
He also attended a Buckingham Palace garden party with the Queen, Prince William and the Duchess of Cambridge at the end of May; shortly before, he supported his wife at the traditional state opening of Parliament.