The quake happened close to where a big quake killed almost 70 000 people in 2008.
The earthquake occurred at 8.02am in Lushan county near Ya'an city and the epicentre had a depth of 12km, the US Geological Survey said.
The quake was felt by residents in neighbouring provinces and in the provincial capital of Chengdu, causing many people to rush out of buildings, according to accounts on China's Twitter-like Sina Weibo microblogging service.
The official Xinhua news agency said 56 people had been confirmed dead. Other state media said about 600 were injured, dozens of them seriously.
President Xi Jinping and Premier Li Keqiang said that all efforts must be put into rescuing victims to limit the death toll as much as possible. Li was on his way to Ya'an, state media said.
Xinhua said 2 000 troops were heading to the area to help with rescue efforts. State television CCTV said only emergency vehicles were being allowed into Ya'an, though Chengdu airport had reopened.
Bloodied bandages
Most of the deaths were concentrated in Lushan, where water and electricity were cut off. Pictures on Chinese news sites showed collapsed buildings and people in bloodied bandages being treated in hospital.
Rescuers in Lushan had pulled 27 survivors out of rubble, Xinhua said.
"We are very busy right now, there are about eight or nine injured people, the doctors are handling the cases," said a doctor at a Ya'an hospital who gave her family name as Liu.
The hospital was seeing head and leg injuries, she added.
A resident in Chengdu, 140km from Ya'an city, told Xinhua he was on the 13th floor of a building when he felt the quake. The building shook for about 20 seconds and he saw tiles fall from nearby buildings.
Ya'an is a city of 1.5 million people and is considered one of the birthplaces of Chinese tea culture and the home to one of China's main centres for protecting the giant panda.
Aftershocks
"There are still shakes and tremors and our area is safe. The pandas are safe," said a spokesperson with Ya'an's Bifengxia nature park, a tourism park that houses more than 100 pandas.
Shouts and screams were heard in the background while Reuters was on the telephone with the spokesperson.
"There was just an aftershock, an aftershock, our office is safe," he said.
Numerous aftershocks jolted the area, the largest of which was magnitude 5.1.
Sichuan is one of the four major natural-gas-producing provinces in China, and its output accounts for about 14% of the nation's total.
Sinopec Group, Asia's largest oil refiner, said its huge Puguang gas field had not been affected.
The US Geological Survey initially put the magnitude at 7, but later revised it down.
The devastating May 2008 quake was 7.9 magnitude. – Reuters