At least 25 people were injured and 21,000 relocated after a 5.3-magnitude earthquake struck a county in southwest China early Saturday, authorities said.

The quake hit Yongshan county in Yunnan province with the epicentre 13 km deep, according to the China Earthquake Networks Centre, Xinhua reported.

According to the county government's information office, at least 25 people were injured and 68,600 residents were affected in the earthquake.

It said five of the injured are in a serious condition. Among the 2,731 damaged houses, 75 collapsed. A total of 48 schools were damaged across six towns. Electricity, transportation and communications in the area are back to normal.

The earthquake-hit area was in a mountainous region. Two roads to the epicentre had been blocked by fallen rocks, but were later reopened.

Railway authorities said the quake did not disrupt railway transportation. Trains from Kunming to cities like Chongqing and Chengdu were in normal operations.

"We felt the quake strongly, but it did not last long," said a local resident.

"All five adobe houses of my family were cracked and tiles fell from the roof when the quake happened," said Sun Guiying, 58, from Bajiao village.

China's second largest hydropower station Xiluodu is only 15 km from the epicentre.