A strong, shallow earthquake shook Indonesia's Sulawesi island just after midnight Friday, toppling homes and buildings, triggering landslides and killing at least 34 people.

More than 600 people were injured during the magnitude 6.2 quake, which sent people fleeing their homes in the darkness. Authorities were still collecting information about the full scale of casualties and damage in the affected areas.

There were reports of many people trapped in the rubble of collapsed homes and buildings.

INDONESIA NAVY DIVERS HUNT FOR CRASHED PLANE'S BLACK BOXES

In a video released by the National Disaster Mitigation Agency, a girl stuck in the wreckage of a house cried out for help and said she heard the sound of other family members also trapped. "Please help me, it hurts," the girl told rescuers, who replied that they desperately wanted to help her.

The rescuers said an excavator was needed to save the girl and others trapped in collapsed buildings. Other images showed a severed bridge and damaged and flattened houses. TV stations reported the earthquake damaged part of a hospital and patients were moved to an emergency tent outside.

Another video showed a father crying, asking for help to save his children buried under their toppled house. "They are trapped inside, please help," he cried.

Thousands of displaced people were evacuated to temporary shelters.

The quake was centered 36 kilometers (22 miles) south of West Sulawesi province’s Mamuju district, at a depth of 18 kilometers (11 miles), the U.S. Geological Survey said.

The Indonesian disaster agency said the death toll climbed to 34 as rescuers in Mamuju retrieved 26 bodies trapped in the rubble of collapsed homes and buildings.

The agency said in a statement that eight people were killed and 637 others were injured in Mamuju's neighboring district of Majene.

It said at least 300 houses and a health clinic were damaged and about 15,000 people were being housed in temporary shelters in the district. Power and phones were down in many areas.

West Sulawesi Administration Secretary Muhammad Idris told TVOne that the governor's office building was among those that collapsed in Mamuju, the provincial capital, and many people there remain trapped.

Rescuers assist a survivor pulled out from the ruin of a government building that collapsed during an earthquake in Mamuju, West Sulawesi, Indonesia, Friday, Jan. 15, 2021. (AP Photo/Azhari Surahman)

Rescuers assist a survivor pulled out from the ruin of a government building that collapsed during an earthquake in Mamuju, West Sulawesi, Indonesia, Friday, Jan. 15, 2021. (AP Photo/Azhari Surahman)

Rescuer Saidar Rahmanjaya said a lack of heavy equipment was hampering the operation to clear the rubble from collapsed houses and buildings. He said his team was working to save 20 people trapped in eight buildings, including in the governor's office, a hospital and hotels.

"We are racing against time to rescue them," Rahmanjaya said.

Relatives wailed as they watched rescuers pull a body of a loved one from a damaged home in devastated Mamuju. It was placed in an orange body bag and taken away for burial.

"Oh my God, why did we have to go through this?" cried Rina, who uses one name. "I can’t save my dear sister ... forgive me, sister, forgive us, God!"

President Joko Widodo said in a televised address that he had ordered his social minister and the chiefs of the military, police and disaster agency to carry out emergency response measures and search and rescue operations as quickly as possible.

"I, on behalf of the government and all Indonesian people, would like to express my deep condolences to families of the victims," Widodo said.

Rescuers carry a body bag containing a victim of an earthquake in Mamuju, West Sulawesi, Indonesia, Friday, Jan. 15, 2021.  (AP Photo/Azhari Surahman)

Rescuers carry a body bag containing a victim of an earthquake in Mamuju, West Sulawesi, Indonesia, Friday, Jan. 15, 2021.  (AP Photo/Azhari Surahman)

The National Search and Rescue Agency’s chief, Bagus Puruhito, said rescuers from the cities of Palu, Makassar, Balikpapan and Jakarta were being deployed to help in Mamuju and Majene.

Two ships were heading to the affected areas from Makassar and Balikpapan carrying rescuers and search and rescue equipment, while a Hercules plane carrying supplies was on its way from Jakarta.

Puruhito is already leading more than 4,100 rescue personnel in a separate massive search operation for victims of the crash of a Sriwijaya Air jet into the Java Sea last Saturday.

Among the dead in Majene were three people killed when their homes were flattened by the quake while they were sleeping, said Sirajuddin, the district’s disaster agency chief.

Sirajuddin, who goes by one name, said although the inland earthquake did not have the potential to cause a tsunami, people along coastal areas ran to higher ground in fear one might occur.

Landslides were set off in three locations and blocked a main road connecting Mamuju to the Majene district, said Raditya Jati, the disaster agency’s spokesperson.

On Thursday, a magnitude 5.9 undersea quake hit the same region, damaging several homes but causing no apparent casualties.

Indonesia’s meteorology, climatology and geophysical agency, known by its Indonesian acronym BMKG, warned of the dangers of aftershocks and the potential for a tsunami. Its chairwoman urged people in coastal areas to move to higher ground as a precaution.

Indonesia, a vast archipelago of 260 million people, is frequently struck by earthquakes, volcanic eruptions and tsunamis because of its location on the "Ring of Fire," an arc of volcanoes and fault lines in the Pacific Basin.

CLICK HERE FOR THE FOX NEWS APP

In 2018, a 7.5 magnitude earthquake in Palu on Sulawesi island set off a tsunami and caused soil to collapse in a phenomenon called liquefaction. More than 4,000 people died, many of the victims buried when whole neighborhoods were swallowed in the falling ground.

A powerful Indian Ocean quake and tsunami in 2004 killed 230,000 people in a dozen countries, most of them in Indonesia.