A moderately strong earthquake and an aftershock hit Indonesia’s resort island of Bali, killing at least three people and destroying dozens of homes.

The quake hit just before dawn, causing people to run outdoors in a panic.

It struck just after the island has begun to reopen to tourism as the pandemic wanes.

The US Geological Survey said the magnitude 4.8 quake was centred 38.5 miles northeast of Singaraja, a Bali port town.

Its shallow depth of 6.2 miles may have amplified the amount of damage.

A magnitude 4.3 aftershock followed.

Rescuers inspect a house damaged by an earthquake (Dewa Raka/AP)
Rescuers inspect a house damaged by an earthquake (Dewa Raka/AP)

That quake was relatively deep, at 174 miles.

Photos from the island showed homes buried in rocks and mud and buildings collapsed, walls splintered on the ground.

Gede Darmada, head of the island’s Search and Rescue Agency, said the agency was still collecting updates on damage and casualties.

Apart from the three confirmed dead, at least seven people were reported hurt, with head injuries or broken bones.

The earthquake triggered landslides in a hilly district, killing at least two people and cutting off access to at least three villages, Mr Darmada said.

It toppled homes and temples in Karangasem, the area closest to the epicentre, killing a three-year-old girl who was hit by falling debris, he said.

“Nearly 60% of the houses in our village were damaged and can no longer be lived in,” said I Nengah Kertawa, head of Bunga village in Karangasem, one of the worst-hit communities.

Houses and government facilities also were damaged in Trunyan and in Kintamani, a popular sightseeing destination with a stunning lake.

An Indonesian soldier walks past houses damaged by an earthquake-triggered landslide (Dewa Raka/AP)
An Indonesian soldier walks past houses damaged by an earthquake-triggered landslide (Dewa Raka/AP)

Known as the “island of the gods”, Bali is home to more than four million mostly Hindu people in the mainly Muslim nation.

It is famed for its temples, scenic volcanos and beautiful white-sand beaches.

On Thursday the island reopened to international travellers for the first time in more than a year after Indonesia’s Covid-19 caseload declined considerably.

The country has had around 1,000 cases a day in the past week after peaking at around 56,000 daily new cases in July.

Indonesia, a vast archipelago of 270 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 that arcs the Pacific.

The last major earthquake was in January when a magnitude 6.2 earthquake killed at least 105 people and injured nearly 6,500.

More than 92,000 people were displaced after it struck Mamuju and Majene districts in West Sulawesi province.