A powerful earthquake rocked New Zealand early Monday local time, killing at least two people, damaging buildings and triggering a tsunami that forced thousands to flee coastal areas.

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 and damage was reported Monday 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."

Prime Minister John Key said the worst damage appeared to be in the Kaikoura area. Power and phones were knocked out, and damage to roads slowed the emergency response, he said. Military helicopters were being used to aid in assessing damage, he added.

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," Key tweeted immediately after the quake. Later he said that at least two people had died. The New Zealand Herald said one person died of a heart attack while another died on a Kaikoura homestead.

Key said he was awakened by "the most significant shock I've felt in Wellington." His nation's tsunami warning was downgraded to a warning of coastal flooding hours after the quake, Key said.

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 local time, which was Sunday morning in the United States.

"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 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 less than 15 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.