Queen Elizabeth has left a London hospital after staying overnight because of an apparent stomach infection.

The palace said she has gastroenteritis and was admitted Sunday to the city's King Edward VII Hospital in West London, the same facility where the pregnant Duchess of Cambridge was treated for acute morning sickness in December.

si-queen-130304-300-ap-04084425

The Queen left the King Edward VII hospital following a one-day stay. (Alastair Grant/Associated Press)

Smiling and dressed in a red coat, the Queen shook hands with hospital employees just outside the facility before she got into her Bentley automobile and was driven away.

"She's going to spend the next few days resting, we're told, and then she hopes to resume some of her normal engagements next week," CBC's Ann MacMillan reported from London.

All of her engagements were cancelled or postponed as a "precaution," a palace spokesperson said earlier.

Elizabeth's two-day trip to Rome had been planned to start Wednesday. A palace spokeswoman said the trip may be "reinstated" at a later date.

The last time the 86-year-old Queen was kept in hospital was in 2003, when she had a knee operation.

She seemed in good health on Wednesday when she made an official visit to the Royal London Hospital. But a trip to Wales scheduled Sunday had to be cancelled because the Queen was feeling unwell. She planned to spend the weekend resting at Windsor Castle, but was taken instead to the hospital by private car around 3 p.m.

"She is otherwise in good health," a press officer for the palace said.

The symptoms of gastroenteritis — vomiting and diarrhea — usually pass after one or two days, although they can be more severe in older or otherwise vulnerable people.

Dehydration common complication

The big danger is getting dehydrated, which is more likely in the very young and the elderly. Patients with a stomach bug are often put on an intravenous drip to remedy the problem.

Over the summer, the Queen celebrated 60 years on the throne, her Diamond Jubilee, and in spite of a busy schedule, she showed no signs of slowing down. It was her husband, Prince Philip, 91, who ended up in hospital, twice, with a bladder infection.

Unofficial court figures indicate the Queen carried out roughly 400 official engagements in 2012 —-ranging from weekly one-on-one meetings with the prime minister to gatherings of 100 or more people.

The office of the Governor General of Canada issued a statement Sunday conveying best wishes and hope for a speedy recovery for the Queen.

"My wife, Sharon, and I were distressed to receive word that Her Majesty Queen Elizabeth II has been hospitalized," said Governor General David Johnston.

"On behalf of all Canadians, we offer our best wishes to the Queen for a quick and full recovery."

Prime Minister Stephen Harper sent out his wishes to the Queen via his Twitter account.

"Laureen and I are sending our best wishes to Her Majesty for a speedy recovery," said Harper's tweet.

With files from The Associated Press