AN XIAN, China - China is grappling with the next huge task in its earthquake disaster - how to shelter the five million people left homeless.

Many were housed yesterday in tent cities like one at the base of Qianfo mountain in the disaster zone.

"After the quake, we couldn't sleep for five days. We were really, really afraid," said Chen Shigui, a 55-year-old farmer who climbed for two days with his wife and injured father to reach the camp from their mountain village. "I felt relieved when we got here."

But there's not enough room.

The government issued an urgent appeal yesterday for tents, and brought in the first foreign teams of doctors and field hospitals - some of whom replaced search-and-rescue specialists.

The switch underscored a shift in the response to China's worst disaster in three decades.

After initially refusing foreign help, China is allowing in medical and rescue teams. A Russian mobile hospital arrived yesterday in the provincial capital of Chengdu, Foreign Ministry spokesman Qin Gang said, and other medical teams were headed in from Taiwan, Germany, Italy and Japan.

On the second of a three-day national mourning period, the government appeared to be reining in the unusually free reporting it allowed in the first week.

Most major newspapers carried near-identical photographs on their front pages of President Hu Jintao and other senior leaders with their heads bowed - a uniformity that is typical when state media censors direct coverage.

The confirmed death toll rose to more than 40,000, with at least 10,000 more deaths expected, and officials said more than 32,000 people were missing.

The State Council, China's cabinet, said 80 percent of the bodies found in Sichuan province had been either cremated or buried.

Vice Minister for Civil Affairs Jiang Li said officials were collecting DNA samples from bodies so the identities of the dead could be confirmed later.

Rescues - becoming more remarkable by the hour - continued on the eighth day since the quake, but the trickle of earlier days had slowed to a drip.

Jiang said that five million people were homeless. He said nearly 280,000 tents had been shipped to the area and 700,000 more ordered, and that factories were ramping up to meet demand. Sichuan's governor said three million tents were needed.

In this encampment in An Xian, hundreds of blue tents dotted the flat farmland where rice and barley are grown.

Some 4,600 people are being housed here, 90 percent of them from the mountains around Chaping village, about 20 miles away, which remains cut off by road, camp director Yang Jianxin said.

As he spoke, the ground rumbled with the latest of what he said were hundreds of aftershocks felt in the last week. Refugees nearby gasped, and some ran from their tents in confusion, before calm settled after the 10-second tremor.