John Bacon

USA TODAY

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. Buildings shook and damage was reported Monday in the capital of Wellington, 130 miles from the epicenter.

Waves up to 6 feet high soon rolled in near Kaikoura, a popular tourism area about 50 miles from the quake's epicenter. New Zealand's Ministry of Civil Defense urged coastal residents to move inland.

"The first wave may not be the largest. Waves might continue for several hours," the agency warned. It urged residents to 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.

Explainer: What is an aftershock?

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.

"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. One person died of a heart attack while another died on a Kaikoura homestead, the New Zealand Herald reported.

New Zealand, an island nation of less than 5 million people, 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.

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 200 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 near Christchurch, 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."

Several aftershocks shook the region, some registering more than magnitude 5.0.

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."