(CNN) -- Britain's Queen Elizabeth II was hospitalized Sunday after experiencing symptoms of gastroenteritis that had already sidelined her weekend plans, Buckingham Palace announced.
The 86-year-old monarch was taken to King Edward VII's Hospital in London "as a precautionary measure" and is expected to stay for two days, said a palace spokesman, speaking with customary anonymity.
"She is otherwise in good spirits and good health," the spokesman 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.
Elizabeth already had canceled a planned trip to Wales on Saturday after exhibiting symptoms of the illness, Buckingham Palace said. All official engagements this week will be postponed or canceled.
At 10 Downing Street, Prime Minister David Cameron's office said, "We wish the Queen well and wish her a speedy recovery."
Gastroenteritis is usually caused by a virus and passed 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.