At least 34 people have been killed and hundreds injured, authorities said.
The quake, with an epicenter 36 kilometers south of West Sulawesi province's Mamuju district and at a depth of 18 kilometers struck at 2:18 am local time, the U.S. Geological Survey said.
Thousands fled their homes to seek safety when the quake hit, damaging at least 60 homes, the agency added.
Sirajuddin, who goes by one name, said at least 218 people were injured so far, as more than 300 houses and buildings were damaged, including a hospital, health clinics, hotels and offices.
The disaster mitigation agency said a hotel and the office of the West Sulwesi governor were severely damaged, and electricity supplies were also down.
Also, Indonesia's meteorology, climatology and geophysical agency warned of the dangers of aftershocks and the potential for a tsunami.
"There are patients and hospital employees trapped under the rubble and we're now trying to reach them", he added, without giving a specific figure.
In this natural disaster, a public health center and a military office were damaged in Mamuju area.
The quake and aftershocks caused three landslides, cut electricity and damaged bridges to regional hubs such as the city of Makassar.
Indonesia earthquake: Hospital flattened as deadly magnitude 6.2 tremor rocks Sulawesi island
A damaged vehicle and buildings are seen following an natural disaster in Mamuju, West Sulawesi province, Indonesia, January 15, 2021 in this photo taken by Antara Foto.
The strong quake also caused power and phone service outages and landslides along roads. "The quake was very strong".
Videos shared on social media showed residents fleeing to higher ground on motorcycles, and a young girl trapped under rubble as people tried to shift debris with their hands. Rescuers struggled to extract seven patients and staff who were trapped under tons of rubble.
"Mamuju is now empty, everyone went to the mountains", he said.
Another resident Syahir Muhammad said: "It's raining and we need help". It was not clear where they were trapped.
The National Search and Rescue Agency says an natural disaster with a magnitude of 6.2 struck the province of West Sulawesi around 2:30 a.m., local time, on Friday. More than 4,000 people died, numerous victims buried when whole neighbourhoods were swallowed in the falling ground.
Indonesia experiences frequent seismic and volcanic activity due to its position on the Pacific "Ring of Fire", where tectonic plates collide.
A powerful Indian Ocean quake and tsunami in 2004 killed 230,000 people in a dozen countries, a lot of them in Indonesia.
Reese Witherspoon 'heartbroken' as Election co-star Jessica Campbell dead aged 38
A GoFundMe page set up to cover the cost of her funeral revealed that she has left behind a 10-year-old son, Oliver . Prior to her death, Campbell had been complaining about congestion and said she thought she was getting a cold.