Local TV station SCTV reported that 26 people had been killed, citing correspondents in the area.
Authorities were not immediately available to confirm that figure, but officials had earlier said nine people had died in Solok, a bustling town close to the epicenter of the quake on Sumatra's western coast.
At least two of the dead were young children along with their teacher, who died when a two-story building crashed onto a playground. Another woman died at a market, said police spokesman Supriadi, who goes by only one name. Town Mayor Samsu Rahim told el-Shinta radio at least five other people had died, three of them burned alive when their collapsed home burst into flames.
"Women were crying out in terror. We all just fled as quickly as we could," said Alpion, a welder in the seaside town of Padang. Along with thousands of others, he was fleeing to high ground fearing a possible tsunami. Authorities said the quake did not cause any tidal activity, the AP said.
A witness in the town of Payahkumbuh said several two-story shops in the main street had collapsed and police and soldiers were digging for survivors.
Hospitals in Solok were overflowing with patients, many of them with broken bones and cuts, said officer Supriadi. At least one hospital in nearby Padang was evacuated, sending panicked doctors and nurses fleeing with startled patients limping behind, according to Metro TV.
The U.S. Geological Survey said the tremor struck 33 kilometers (20 miles) below Solok. It was followed by several strong aftershocks.
"Everything in my house fell down ... a cabinet hit me," said Rahma Nurjana, a resident in nearby Padang. "My neighbor's house collapsed."
The tremor and at least one of the aftershocks was felt in Singapore, 430 kilometers (265 miles) from the epicenter, forcing the evacuation of several older office buildings, TV station Channel NewsAsia reported.
In Malaysia's southern coastal city of Johor, citizens fled offices, buildings and shopping centers, eyewitnesses said.
Indonesia, the world's largest archipelago, is prone to seismic upheaval because of its location on the so-called Pacific "Ring of Fire," an arc of volcanos and fault lines encircling the Pacific Basin.
In December 2004, a massive earthquake struck off Indonesia's Sumatra island and triggered a tsunami that killed more than 230,000 people, including 131,000 people in Indonesia's Aceh province alone. A tsunami off Java island last year killed nearly 5,000.
Tuesday's quake hit about 900 kilometers (660 miles) west of the country's capital Jakarta.
The head of the Voronezh region, Alexander Gusev, confirmed the death of Major General Vladimir Zavadsky.