The tremor was at a depth of 106 kilometres, 84 kilometres north of the capital, Nuku'alofa.
The Pacific Tsunami Warning Centre said there was no danger of a tsunami.