The death toll from the most deadly earthquake to hit China in more than three decades today reached nearly 10,000 in Sichuan province alone, the state-run Xinhua news agency reported.

Worst hit was Sichuan province's Beichuan county, where a further 10,000 were feared injured and 80% of the buildings were flattened, including eight schools and one hospital.

As reports trickled in from areas that had been cut off since the earthquake hit this morning, the death toll is expected to rise.

There are fears over some 900 students buried in a secondary school in the city of Dujiangyan, also in Beichuan county.

Photos posted on the internet revealed arms and a torso sticking out of the wreckage of the school as dozens of people scrambled to free the students using small mechanical winches or their bare hands.

Xinhua news agency reported that 50 bodies had been recovered from the debris, but did not say whether there were survivors.

Dale Rutstein of Unicef China, said Sichuan was one of the poorest provinces in China, which would add to the scale of the disaster.

"There are a lot of people living in marginal areas that are difficult to get to and a lot of the buildings in those areas are substandard and could collapse very quickly," he said.

The 7.8-magnitude quake struck 57 miles north-west of Chengdu, the capital of Sichuan. Tremors from the quake, which struck at 2.28pm (6.28am BST), were felt as far away as Thailand and Vietnam.

"We felt continuous shaking for about two or three minutes. All the people in our office are rushing downstairs. We're still feeling slight tremblings," said an office worker in Chengdu.

The US Geological Survey said the quake was centred 6 miles below the Earth's surface.

In Sichuan, phone lines were cut and a website for the Aba prefecture, which includes Beichuan county, said the quake had severed several major highways in the region and communications were down in 11 counties.

A chemical plant collapsed in Shifang city, to the south-east of the epicentre, burying hundreds of people and sending more than 80 tonnes of toxic liquid ammonia leaking from the site, state media reported.

The prime minister, Wen Jiabao, had rushed to the area and the president, Hu Jintao, ordered an "all-out" rescue effort, Xinhua reported.

Rescue teams were trying make contact with cut-off areas. Thousands of army troops and paramilitary People's Armed Police were taking medical supplies to the region, state television said.

Wen appealed for people to rally together. "This is an especially challenging task," he said, reading from a statement. "In the face of the disaster, what's most important is calmness, confidence, courage and powerful command."

The quake is the worst to hit China in 32 years since the 1976 Tangshan earthquake in north-eastern China which claimed up to 300,000 lives.

There was no visible damage in Beijing, about 930 miles away, but tremors were felt. The showpiece Bird's Nest Olympic stadium, which is built to withstand a 8.0 quake was unscathed, a spokesman for the Olympic organising committee said.

The region most severely affected is largely populated by Han Chinese but has sizeable Qiang and Tibetan populations. Wenchuan county, the epicentre of the quake, according to Sichuan seismologists, is also home to the Wolon nature reserve, a centre for research on giant pandas.

Wyndham Jamesof Save the Children said the timing of the earthquake would contribute to higher fatalities.

"The earthquake was about 2.30pm and is a time when most children are in school. There are also other institutions like orphanages and hospitals that could be affected," he said, adding that the official death toll was a conservative estimate.

State television has been broadcasting advice for those trapped in the earthquake, telling people to "keep calm and conserve energy". Survivors have been told to "seek water and food, and wait patiently for rescue".