The tremor hit on Tuesday in a mountainous area about 50km northeast of Padang, a city on Sumatra's western coast, recording a depth of 33km, the US Geological Survey said.
Hospitals were quickly overwhelmed and local officials appealed for urgent help.
The earthquake appeared to have been followed by at least one aftershock almost as strong as the first quake.
Budi Sarwono, the chief of police in Solok, one of the towns affected, had earlier put the toll at 41 but said he expected it to increase.
Many people were trapped in collapsed buildings and there was no official information about the situation at the quake's epicentre because phone lines were down, Utjin Sudiana,
Help needed
"Several houses have collapsed. There are hundreds of victims," Solok mayor Samsurahim told ElShinta radio, adding that a school had been burnt to the ground after the quake.
"We have asked for medical help," he said. "Our facilities here are insufficient."