BEIJING -- A strong, shallow earthquake shook southwestern China overnight, killing at least one person, damaging buildings and prompting thousands to camp outside as aftershocks continued to strike the area, officials said Wednesday.

The earthquake with a magnitude of at least 6.0 hit the Weiyuan city area of Yunnan province at 9:49 p.m. when most residents would have been in their homes. At least 324 people also were injured, eight of them seriously, the Yunnan provincial government said.

"The whole building was shaking terribly with a loud cracking sound. Plates fell off in the kitchen," the official state Xinhua News Agency quoted Weiyuan resident Li Anqin as saying.

"We all ran out and the streets now are packed with people," Li said.

The U.S. Geological Survey said the earthquake measured magnitude 6.0 at a depth of 10.1 kilometres (6.3 miles). Its shallow focus was likely to cause greater damage, but there were no immediate reports of serious destruction.

China's national earthquake monitoring agency gave the quake's magnitude as 6.6 and said it struck just 5 kilometres (3.1 miles) below the surface. It said the quake was followed by eight aftershocks, the strongest of which registered at magnitude 4.2.

Chinese Premier Li Keqiang ordered an "all-out effort" to rescue quake victims, ensure the delivery of food, water and other supplies, and fix disruptions to transportation and communications.

Worst hit was the town of Yongping, 5 kilometres (3 miles) from the epicenter, where some houses had collapsed, Xinhua said.

Yongping has a population of 54,000, while the surrounding county of Jinggu closest to the epicenter has a population of 290,000.

Residents of a community near a 5-square-kilometre (2-square-mile) reservoir in Jinggu were evacuated after the reservoir's dam was found to have an 8-centimetre-wide (3-inch-wide) crack that was leaking water following the quake. Officials were assessing the risk to the dam and seeing about repairs, said a Jinggu county official who gave only his surname, Yao.

Xinhua said strong tremors were felt in the provincial capital, Kunming, about 360 kilometres (220 miles) to the northeast. It said an initial 230-member rescue team was dispatched to the quake area within two hours of its striking.

A state television reporter in the city of Pu'er, about 85 kilometres (53 miles) from the epicenter, said people fled buildings and were camping outdoors in anticipation of more aftershocks. The reporter, Wang Jian, said there was damage to structures and the local cellphone network.

The remote mountainous region near the border with Myanmar is prone to earthquakes. A 6.1-magnitude quake in northern Yunnan in August killed at least 615 people and left more than 100 others missing. In 1970, a magnitude-7.7 earthquake in Yunnan killed at least 15,000 people.