Media playback is unsupported on your device Media caption Passengers described blankets and even people "flying" up to the plane's ceiling

A Canada-bound airliner was forced to make an emergency landing after severe turbulence injured 21 passengers, including three children, officials said.

The Air Canada flight from Shanghai to Toronto was diverted to Calgary after the turbulence hit.

Eight passengers suffered neck and back injuries and 13 more were taken to hospital for observation.

The injured were in a stable condition, an emergency services spokesman said.

Bing Feng, a passenger, described hearing "lots of screaming" as the plane became "like a rollercoaster".

Another passenger, Yi Lee, said: "To start with it was just OK, normal just up and down, and all of a sudden it was really violent and just shaking everybody.

Analysis: Richard Westcott, transport correspondent, BBC News

Even enthusiastic fliers like me can get nervous when there is some chunky turbulence around. But although people can get hurt if they aren't strapped in, turbulence doesn't crash airplanes.

Lots of things can cause turbulence, but pilots can often predict when it's coming, so they can either avoid it or put on the fasten seat-belt signs. And aircraft are built to withstand even the worst excesses of mother nature. Wings are bent until they snap, hulls are tested by attacking them with artificial lightning strikes. In the most extreme examples, turbulence could potentially damage an aircraft, but it won't knock it out of the sky.

There is a brilliant blog about it here. It points out that most of the small number of injuries each year are to flight crews. It also says that the best place to sit if you hate turbulence is over the wings - and the worst place is at the back.

Follow Richard on Twitter

"Suddenly the flight is just going down and everything is really scary. The girl sitting next to me, she was sleeping and she just fly up [to the ceiling]."

Gord Murray, a frequent flyer, said the turbulence was the worst he'd ever experienced.

Some passengers were taken off the plane strapped to stretchers. Emergency Medical Services spokesman Stuart Brideaux said the injuries were limited to non-life-threatening neck and back injuries.

Air Canada's chief operating officer Klaus Goersch said the passengers had been through a "very unsettling experience".

He praised the crew's response and said some of the injured had been quickly discharged.

The Boeing 777 with 332 passengers and 19 crew on board landed at Calgary without further incident, the airline said in a statement.