A powerful undersea earthquake struck off the southern Philippines on Saturday, prompting people to scramble out of shopping malls and buildings. Authorities warned villagers to stay away from beaches in case of a tsunami.

No casualties or damage were reported hours after the quake struck before noon. The Pacific Tsunami Warning Center lifted its warning for a potential tsunami that it had said could hit coastal areas of the southern Philippines and Indonesia.

The Philippine Institute of Volcanology and Seismology said the quake was detected at a depth of 37 miles and a magnitude of 7.2 about 100 miles off Davao Oriental province. Several aftershocks, including one with a magnitude of 5.6, were later felt by residents but no major damage was reported, officials said.

Get Breaking News Delivered to Your Inbox

The U.S. Geological Survey said the quake had a magnitude of 6.9.

This image from the United States Geological Survey (USGS) shows the earthquake on Saturday. USGS

Shortly after the quake struck, Renato Solidum, who heads the quake-monitoring institute, said a major tsunami was unlikely given the quake's depth but his agency advised villagers to avoid beaches in Davao Oriental province and outlying coastal regions for about two hours after the quake hit around noon as a precaution.

The quake was felt in several southern provinces and cities, including in President Rodrigo Duterte's hometown in Davao city and in nearby Tagum City. Shoppers, including children yelling in fear, rushed out of a five-story mall and many occupants abandoned a 26-floor condominium in a commercial district as the ground shook.

"I was at the front desk and saw the chandeliers swaying," Jonna Ramos, a hotel worker in General Santos, told Reuters news agency. Ramos said guests at the hotel were evacuated but later returned to the building.

Indonesia's Meteorology and Geophysics Agency said the quake didn't have the potential to cause a tsunami affecting that country, which is still reeling after a December 22 tsunami caused by an eruption on a volcanic island killed more than 400 people.

The Philippines and Indonesia lie along the so-called Ring of Fire, a seismically active arc of volcanoes and fault lines in the Pacific Basin.