The quake hit a sparsely populated area 200 km (120 miles) northwest of the city of Guangyuan late on Tuesday at a depth of 10 km (6 miles), the U.S. Geological Survey said. It was also close to the Jiuzhaigou nature reserve, a tourist destination.
A separate quake with a magnitude of 6.6 struck a remote part of China's far northwestern region of Xinjiang, more than 2,000 km (1,240 miles) away, on Wednesday morning, the Chinese earthquake administration said. State television said 19 people had been injured in the mostly rural area.
The Sichuan government said rescuers were gradually evacuating tourists and residents who had been cut off by landslides.
Six tourists were among those killed, according to the official China News Service.
The state-run Xinhua news agency said a total of 13 people had been killed, citing the provincial government, and that as many as 31,500 tourists had been evacuated from the quake zone, leading to traffic jams on the narrow roads.
A few dozen tourists were camped out at Jiuzhaigou airport, waiting for flights out. The airport is open but many of the flights are delayed.
"On the way from the airport to the hotel there were lots of cars on the road - it looked chaotic.
No one would tell us any details," said one tourist who gave his family name as Zhang.
A French man and a Canadian woman suffered light injuries, Xinhua reported.