At least three people died and 24 were injured after a magnitude-6.2 earthquake struck the Indonesian province of West Sulawesi on Friday, the country’s disaster mitigation agency said.

The quake hit at 2:18 a.m. local time (18:18 GMT Thursday) with the epicenter 36 kilometers south of Mamuju, the capital of West Sulawesi, and a depth of 18 kilometers, the United States Geological Survey said.

Hospitals and office buildings were destroyed in Majene district and Mamuju district in the nearby province of South Sulawesi, according to local media.

Scores of people were trapped under damaged houses and buildings and rescue efforts are underway.