A 6.4-magnitude earthquake struck Yunnan province in southwestern China late on Friday, killing three people and injured 27, state television reported on Saturday.

The quake hit at a depth of 8 kilometres and was followed by aftershocks, CCTV reported, citing data from China Earthquake Networks Center.

CCTV quoted authorities as saying the collapse of some roads along with landslides had cut some transportation lines, but electricity, telephones and internet were working.

In a tweet, state media Global Times said an emergency was declared and rescue operations were launched in Dali, a city of 134 000 people in Yunnan province about 24 km from the epicentre.

A 7.4-magnitude earthquake also struck Qinghai province in western China on Saturday, CCTV reported.