A tsunami alert for New Zealand has been cancelled, following a magnitude 7.9 earthquake near Tonga this morning.

In Tonga itself, the earthquake caused panic, but there was no sign of a tsunami.

An hour after the tsunami was scheduled to strike Tonga and Apai Moala, senior geological assistant with the Tongan Ministry of Land and Surveys said there had been no reports from coastal areas of a wave.

Mr Moala said Tongan authorities were therefore confident there had been no wave of any significance generated.

New Zealand's Ministry of Civil Defence and Emergency Management issued a tsunami warning shortly after 8am today, but cancelled it about an hour later.

"As more information has become available it is now clear that there is no risk of a tsunami that could cause damage to New Zealand," director John Hamilton said at 9.15am.

"I understand that the advisory the minstry issued is likely to have caused concern and inconvenience for some people. However, the first information we received immediately after the earthquake showed that a tsunami could have been generated and may have posed a danger to New Zealand.

"Based on that information, we could have endangered lives in our country if we did not issue the advisory. Given similar information in the future, we would again issue a advisory".

Mr Hamilton said it was vitally important that people did not become complacent about possible future risk from tsunami.

"The next time we might not be so lucky. Instead of cancelling a warning, we could be cleaning up the aftermath".

The Tongan earthquake occurred at a depth of 10 kilometres, 210 kilometres south of the capital of Nuku'alofa. The region, along the Kermadec Arc, is part of the Pacific Ring of Fire.

It sparked the tsunami warning for Tonga, Niue, New Zealand, Kermadec Islands, American Samoa, Samoa, Wallis and Futuna and Fiji. It was not related to the major undersea eruption occurring to the north of Tonga's capital.

A reporter in Nuku'alofa told Stuff.co.nz that the quake caused panic in the city.

"A lot of people were running around," he said, but added there was no obvious sign of damage at this stage.

People were worried by a possible tsunami but there had been no sign of one.

If a tsunami had been generated from the earthquake these were the expected arrival times for the wave: