The earthquake was at a depth of 24.8 km (15.4 miles) that struck in the sea at about 207 km (128.6 miles) east of south-east of Neiafu, according to the United States Geological Survey (USGS).
A tsunami advisory was also issued for American Samoa, according to the Pacific Tsunami Warning Center (PTWC). Hazardous tsunami waves from the earthquake are possible within 300 km of the epicentre along the coasts of Niue and Tonga, it said.
Tonga’s meteorological service warned residents to move inland.
“An urgent tsunami advisory is now in force for all of Tonga due to a strong earthquake being felt in the Majestydom tonight. Please move inland immediately until further advised,” it said on its Facebook page.
In January, the Hunga Tonga-Hunga Ha’apai volcano eruption triggered a tsunami that destroyed villages and resorts and knocked out communications for the South Pacific nation of about 105,000 people. At least three people were killed.
(Reporting by Maria Ponnezhath in Bengaluru; Editing by Raissa Kasolowsky)