The Liu Han Hope Elementary school in Beichuan county stands in the heart of the disaster zone yet, while hundreds died across Sichuan province in classrooms that crumbled to dust, every one of its 483 pupils survived last week's quake.

China yesterday raised its toll of the dead and missing to 70,000, and warned of a "desperate need" for tents to shelter millions of homeless survivors. But the story of the children's escape is a rare piece of good news. While other schools disintegrated, theirs stood firm. Even the three-storey glass wall remained intact. When the slopes around them began to threaten their safety, staff marched pupils as young as five out of their remote home on an all-day, all-night trek.

"It was nothing outstanding - just a teacher's responsibility," Xiao Xiaochuan said. "It was not done by one teacher but by the whole faculty and students, with help from police and officials."

The 38-year-old teacher described how the buildings crumbled and earth and rocks crashed from the mountains behind them. "Dust and dirt coated the sky. It was hard to breathe and the children cried in shock. We surrounded them in the playground, comforting them," he said.

At first, the eight teachers agreed to wait for rescue. Through the hundreds of tremors that followed, the pupils huddled beneath a tiny shelter fashioned with help from farmers. As day broke, parents came to find their children and carry them away. But with 71 left unclaimed, the road out blocked and drenching rain threatening further mudslides, staff concluded that anything was safer than staying at the school - even the hike across three mountains. Local officials spared 12 police to aid them.

"There was almost no road and the children got their feet stuck in the mud and fell easily. Teachers, police and other students carried the little ones on their backs," Xiao said. "Everyone braved the heavy rain, scary forests, falling rocks and huge cracks on the slopes. We were exhausted, hungry and thirsty. After five hours we reached the top. But downhill was even harder - many children lost their shoes. The youngest was a very brave boy. He ran barefoot even when his feet were scratched by stones and thorn bushes."

As the miles passed, the teachers cheered the students along with fibs. "We kept telling them: we are going to Renjiaping, where there is a rescue station. Your parents are waiting for you there, and 'uncle policemen' who can protect you, and lots of tasty food - so just hold on.

"We felt there was a heavy burden on us - we couldn't make any mistakes. But we survived a devastating disaster so we believed we could make it through."

At the highway, they met astonished officials who feared the whole school had been wiped out. Hours later, they were safe in Mianyang, where Xiao and his wife - another of the school's teachers - found their son, 14, safe and well.

Looking back on the journey, he said he felt no pride, only relief. "The children have grown up fast," he said. "Some of them told me they want to work very hard to be scientists in future, so they can be earthquake experts."

Many do not know if their parents have survived; all of the staff have lost family.

For now, Sichuan's Han Long Group is feeding and clothing the children. But the community is perhaps most grateful for the effort the company put into building the school in the first place. The issue of shoddily built schools has become a sensitive matter following the quake.

A Chinese blogger and TV commentator, Li Chengpeng, said he had spoken to the project manager. The man, who did not want to be named, said his bosses had stressed the importance of safety - but also recalled the battles that had involved. On one occasion he had to force builders to replace substandard cement. On another, he had to fight officials who had intercepted part of the funding.

The children's trip across the mountains was miraculous, Li said. "But it was a true miracle that somebody fought hard for the school's safety 10 years ago so it was able to stand firm in an earthquake many years later."