The east coast of New Zealand was hit by a powerful 7.1 magnitude earthquake before dawn on Friday, generating a small tsunami, but officials said there was no significant damage or injuries.
A swarm of aftershocks, several of nearly 6.0 magnitude, rocked the region for many hours after the initial jolt as coastal residents made their way to high ground by torchlight.
But less than three hours later they were advised they could return home after a 30-centimetre (one foot) tsunami was detected.
"The greatest wave height has already occurred, further waves are anticipated to be up to 20 centimetres," the Civil Defence organisation, which is responsible for national emergency management, said.
"Areas under 'marine and beach threat' can expect unusually strong currents and unpredictable water flows near the shore.
This means a threat to beach, harbour, estuary and small boat activities."
However, despite the power of the temblor, East Coast Civil Defence information officer Sheridan Gundry told Radio New Zealand the impact was minimal.
"We haven't heard any reports of injuries or damage at all," she said.
"There was power out in a few places but we've been let off pretty lightly as far as damage goes."
The tsunami warning covered the East Coast of the North Island and the upper South Island.
The shallow tremor, off the coast of New Zealand, was estimated at a depth of around 30 kilometres (18 miles), according to the US Geological Survey. It struck at 4:37am (1637 GMT) and was centred 167 kilometres (103 miles) from the nearest main town, Gisborne, which has a population of around 45,000.
A massive magnitude 7.1 - strikes 166km NE of Gisborne, New Zealand is the first major quake of September
A mag 6.4 strikes the same area just two days after a massive magnitude 7.4 hit the South Georgia Island region
Near miss! A magnitude 6.0 strikes Japan north east of Fukushima
A massive magnitude 7.4 strikes South Georgia Island region
A massive M7.2 - New Caledonia and a M6.1 Fiji Islands are the 4th and 5th major quakes this month
A magnitude 6.1 - South Indian Ocean is the first major quake of August
A monster quake, magnitude 7.7 strikes - 31km SSW of Agrihan, Northern Mariana Islands
A magnitude 6.0 - Off the coast of Aisen, Chile is the sixth major quake of July
A mag 6.4 - 128km SE of Lorengau, Papua New Guinea is the 5th major quake of the month
A mag 6.2 - 66km WNW of Diego de Almagro Chile is only the fourth major quake of July
San Andreas Fault rocking and rolling as hundreds of tremors strike since Sunday night!
A mag 6.0 - 76km NNW of Isangel, Vanuatu is only the third major quake of July
A mag 6.3 - rocks New Zealand with two large aftershock's of mag 5.7 and a large foreshock of mag 5.7
A magnitude 6.3 - 32km NW of Rosa Zarate, Ecuador is the first major quake of July
Major quakes not on the increase in 2016...An ave 72 half way through the year