By Catherine E. Shoichet and Matt Smith
CNN
(CNN) -- Britain's Queen Elizabeth II was discharged Monday from a London hospital, where she was treated for symptoms of gastroenteritis.
The 86-year-old monarch had been taken to King Edward VII's Hospital on Sunday morning "as a precautionary measure," a Buckingham Palace spokesman said, speaking with customary anonymity.
The queen smiled as she left the hospital Monday.
It was the first time the queen had been hospitalized in a decade. Her official engagements for the week were postponed or canceled Sunday.
Elizabeth had already canceled a planned trip to Wales on Saturday after showing symptoms of the illness, Buckingham Palace said.
Gastroenteritis is an inflammation of the lining of the stomach and intestines. Though commonly known as "stomach flu," it is not caused by the influenza virus, according to the U.S. Centers for Disease Control and Prevention.
The illness is usually caused by a virus and passed from person to person, said Dr. Corey Siegel, a gastroenterologist and professor at Dartmouth College's Geisel School of Medicine. But it can also be caused by bacteria, either foodborne or personally transmitted, he said.
The bug usually has to run its course. But doctors often give hospitalized elderly patients intravenous fluids to prevent dehydration, which can lead to kidney problems, Siegel said.
Elizabeth celebrated her 60th anniversary on the throne in 2012 and turns 87 in April. She was last hospitalized in 2003 for knee surgery.
Her husband, the 92-year-old Prince Philip, was hospitalized three times between December 2011 and August 2012 -- once for treatment of a blocked coronary artery and twice for a bladder infection.
CNN's Richard Quest, Elizabeth Cohen, Per Nyberg and Max Foster contributed to this report.