Prince Philip's release from hospital came after five nights away from Balmoral following the recurrence of a bladder infection that he first encountered during the Diamond Jubilee.
The Duke was taken ill during his traditional annual summer break with the Queen at the royal family's Scottish estate.
During his time at the NHS hospital, he was not visited by Her Majesty or other family members after being advised by doctors to rest, but remained in regular contact with relatives by telephone.
The Duke of Edinburgh was in good enough spirits when he left Aberdeen Hospital after a five-day stay that he shared a joke with the staff.
The Duke of Edinburgh joked with Aberdeen Royal Infirmary staff as he bid farewell after five nights of care for a bladder infection.
The Duke of Edinburgh has spent a third night in Aberdeen's Royal Infirmary and is said to be responding well to treatment