A powerful earthquake and two strong aftershocks rocked Indonesia’s resort island of Bali and other parts of the country early Tuesday, causing panic but no immediate reports of damage or casualties.

The U.S. Geological Survey said the quake had a preliminary magnitude of 7.1 and was centered in the Bali Sea 112 miles northeast of Gili Air, a tiny island near the coast of Lombok Island, next to Bali. It occurred at a depth of 319 miles.

Indonesia’s Meteorology, Climatology and Geophysical Agency said there was no danger of a tsunami but warned of dangers from aftershocks. The agency put the quake's preliminary magnitude at 7.4. Variations in early measurements are common.

MAGNITUDE 7.1 EARTHQUAKE HITS REMOTE PACIFIC, NO TSUNAMI THREAT

The quake was followed by aftershocks of magnitude 5.4 and 5.6 that hit the Bali sea a few minutes later, just before dawn.

Many residents and tourists rushed out of their homes and hotels toward higher ground after reporting powerful shockwaves, but the situation returned to normal after they received text messages saying the quake had no potential to trigger a tsunami.

Bali island

Clouds hover around an island of Bali, Indonesia. A powerful earthquake rocked Indonesia’s Bali and Java islands Tuesday.  (Giovanni Mereghetti/UCG/Universal Images Group via Getty Images)

"I thought the walls were going to come down on the hotel," an Australian tourist said on social media.

People in the neighboring provinces of East Java, Central Java, West Nusa Tenggara and East Nusa Tenggara also felt the tremors and panicked as houses and buildings swayed for several seconds.

6.2 MAGNITUDE EARTHQUAKE STRIKES NORTHERN ARGENTINA

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 in the Pacific.

An earthquake in the hilly Karangasem in 2021 triggered landslides and cut off at least three villages, killing at least three people.

CLICK HERE TO GET THE FOX NEWS APP

A magnitude 5.6 earthquake last year killed at least 331 people and injured nearly 600 in West Java’s Cianjur city. It was the deadliest in Indonesia since a 2018 quake and tsunami in Sulawesi killed about 4,340 people.

In 2004, an extremely powerful Indian Ocean quake set off a tsunami that killed more than 230,000 people in a dozen countries, most of them in Indonesia’s Aceh province.