The USGS said the tremor struck at 4.44 pm local time (0544 GMT) at a depth of 10 kilometres (6.2 miles), 279.0 km (173.0 mi) southeast of Tadine, New Caledonia.
The US National Weather Service issued a warning that "hazardous tsunami waves are possible for coasts located within 300 km of the earthquake epicenter", including along the coasts of the Pacific island nation of Vanuatu.
"Persons located in threatened coastal areas should stay alert for information and follow instructions from national and local authorities," it added.