Rescuers searched for more than a dozen patients and staff trapped beneath the rubble of a hospital that was flattened when a powerful earthquake rocked Indonesia's Sulawesi island Friday, killing at least three people, authorities said.

Dozens more were injured when the 6.2-magnitude quake struck in the early hours, triggering panic among the terrified residents of the island, which was hit by a huge quake two and a half years ago in which thousands were killed.

A hospital in Mamuju, a city of some 110,000 in West Sulawesi province, was levelled.

AFP / STAFF

"The hospital is flattened -- it collapsed," said Arianto from the rescue agency in Mamuju city, who goes by one name.

"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.

Rescuers were also trying to reach a family of eight trapped under the rubble of their destroyed home, he added.

Rescuers look for survivors trapped in a collapsed building in Mamuju, the capital of Sulawesi, after the overnight quake
Rescuers look for survivors trapped in a collapsed building in Mamuju, the capital of Sulawesi, after the overnight quake NATIONAL SEARCH AND RESCUE AGENCY / HANDOUT

The country's search-and-rescue agency earlier said at least one hotel had collapsed after the quake struck at 2:18 am local time Friday (1818 GMT Thursday).

It later clarified that the hotel had partially caved in, while the regional governor's office also suffered extensive damage.

A Mamuju resident said damage across the city was severe, but the full extent of the disaster and casualties was not immediately clear.

The overnight quake triggered panic among terrified residents
The overnight quake triggered panic among terrified residents NATIONAL SEARCH AND RESCUE AGENCY / HANDOUT

"Roads are cracked and many buildings collapsed," said 28-year-old Hendra, who also goes by one name.

"The quake was very strong... I woke up and ran away with my wife."

National Disaster Mitigation Agency spokesman Raditya Jati said three people had been killed and 24 injured.

The death toll could rise.

The epicentre was 36 kilometres (22 miles) south of Mamuju and the quake had a relatively shallow depth of 18 kilometres, the United States Geological Survey said.

Images supplied by the search-and-rescue agency showed buildings reduced to rubble, while another showed rescue workers checking on two sisters who were trapped under rubble. It was not clear where they were trapped.

Indonesia experiences frequent seismic and volcanic activity due to its position on the Pacific "Ring of Fire", where tectonic plates collide.

In 2018, a 7.5-magnitude quake and a subsequent tsunami in Palu on Sulawesi left more than 4,300 people dead or missing.

On December 26, 2004, a 9.1-magnitude earthquake struck off the coast of Sumatra and triggered a tsunami that killed 220,000 throughout the region, including around 170,000 in Indonesia.