A powerful earthquake rocked New Zealand early Monday local time, rattling buildings and triggering a tsunami that forced coastal residents to flee to higher ground.

The U.S. Geological Survey said the magnitude-7.8 quake was centered less than 60 miles northeast of Christchurch, scene of a devastating 2011 quake that killed almost 200 people. Buildings shook in the capital of Wellington, 130 miles from the epicenter.

Waves of up to 6 feet almost immediately began rolling in near Kaikoura, 100 miles northeast of Christchurch. New Zealand's Ministry of Civil Defense urged coastal residents to move inland immediately.

"The first wave may not be the largest. Waves might continue for several hours," the agency warned. It urged residents stay out of the water and off beaches — and to resist the temptation to go "sightseeing."

New Zealand, an island nation of less than 5 million people in the southwestern Pacific, is about 1,200 miles east of Australia and 4,600 miles southwest of Hawaii. The Pacific Tsunami Warning Center said a Pacific-wide impact was not expected and that Hawaii was not threatened.

"I hope everyone is safe after the earthquake tonight," Prime Minister John Key tweeted. "@NZcivildefence is looking into the impact of the quake. Follow them to stay updated."

New Zealand sits in the "Ring of Fire," an area in the Pacific Basin battered by frequent earthquakes and volcanic eruptions. The quake was a terrifying reminder of the deadly magnitude-6.3 temblor that struck six miles southeast of Christchurch in February 2011, killing almost 185 people and destroying infrastructure.

Monday's quake struck shortly after midnight. New Zealand is 18 hours ahead of the Eastern Time.

"It was massive and really long," Tamsin Edensor, a mother of two in Christchurch, told Agence France-Presse. "We were asleep and woken to the house shaking, it kept going and going and felt like it was going to build up."

Marie Black, deputy mayor of New Zealand's Hurunui District, lives about 40 miles north of Christchurch. She told the New Zealand Herald there were reports of damage throughout the region.

"It was a significant shake," she said. "I have felt several aftershocks, and it is very unnerving."

The geological survey initially recorded the quake as magnitude-7.4 before upgrading it to 7.8. Several aftershocks shook the region, some registering more than magnitude-5.0. Damage was reported to buildings as far away as Wellington, but there were no immediate reports of serious injuries.

The geological survey said the quake emerged from the relatively shallow depth of about 6 miles. Shallow quakes tend to be felt more broadly than those that are centered well below the earth's surface.

Steve Braunias, a staff writer for the Herald, said he was asleep in his seventh-floor hotel room in Wellington when the quake hit. He took cover under a piece of furniture, saying he waited more than a minute for the swaying to subside."

"It began very slowly. ... The bed seemed to be twitching and it very quickly built," he said. "It was terrifying. I thought I was going to die."