Queen Elizabeth, looking well and smiling, has left hospital in London a day after being admitted with symptoms of gastroenteritis.
She had been at King Edward VII Hospital since Sunday - her first hospital stay in 10 years.
All official engagements for this week, including a visit to Rome, were either cancelled or postponed. She also missed St David's Day celebrations in Swansea.
Buckingham Palace said the Queen, 86, was admitted as a precaution and was otherwise in "good health".
A Bentley arrived to take the Queen to Buckingham Palace on Monday afternoon.
Dressed in a red coat and smiling, she shook hands with hospital staff on the steps outside.
On Saturday, the Queen missed the military ceremony in Wales due to the stomach bug. On Sunday, she was driven to hospital from Windsor Castle, where she had been resting, after carrying out a private medal presentation earlier in the day.
Gastroenteritis can be transmitted through contact with an infected person or contaminated food and drink. Symptoms can include vomiting, fever and stomach ache.
The Queen last received treatment 10 years ago, again at the King Edward VII's hospital, for a minor knee operation. At the same time, surgeons removed minor, non-cancerous lesions from her face.