The offshore quake hit at a depth of 35 km (22 miles) about 24 km west of Mindanao island's Sarangani Province, the United States Geological Survey (USGS) said.

Videos posted to Facebook showed a shopping center with a Jollibee fast food restaurant collapsing into rubble in the province's General Santos City, while a building on a local school campus crumpled in another.

"Lord, it has really collapsed! It has really collapsed! The building has really collapsed!" someone can be heard shouting.

The moment a building in General Santos City on Mindanao island, southern Philippines, collapsed during the June 8 earthquake. Video: X/Mario Nawfal

Master Sergeant Robert Dagon of the General Santos City police said that "a number of buildings collapsed", including homes.