New Zealand is planning to send in military helicopters and a navy ship to rescue about 1,000 tourists and hundreds of residents who remain stranded in the coastal town of Kaikoura after a powerful earthquake on Monday cut off train and vehicle access.

The magnitude-7.8 quake struck the South Island just after midnight. It left two people dead and triggered a small tsunami. It also brought down rocks and mud that swept across highways and cracked apart roads.

COMPARING 2011 AND 2016 NEW ZEALAND EARTHQUAKES

Home to about 2,000 residents, Kaikoura is a popular destination for travelers taking part in whale-watching expeditions or wanting a stopover with mountain views. But the quake knocked out water supplies and sewerage systems and left people with no easy way out.

"From all directions, Kaikoura has essentially been isolated," Air Commodore Darryn Webb, the Acting Commander of New Zealand's Joint Forces, told The Associated Press. "There's a real imperative to support the town because it can't support itself."

Webb said the military planned to begin using four NH90 helicopters on Tuesday that could each transport about 18 people out of the town at a time. He said a ship was also leaving Auckland on Monday night that could potentially pick up hundreds of people if weather conditions allowed.

PHOTO: THREE COWS STRANDED ON PATCH OF LAND AFTER POWERFUL NEW ZEALAND QUAKE

"We're going to get as many people and belongings out as quickly as we can," Webb said.

He said the weather forecast wasn't looking great and the operation could take several days. He said that if needed, a C-130 military transport plane could drop fuel, water, food and other supplies to the town.

Elsewhere, strong aftershocks continued to shake New Zealand on Monday, rattling the nerves of exhausted residents. The country was largely spared the devastation it saw in 2011 when an earthquake struck the city of Christchurch and killed 185 people. That quake was one of New Zealand's worst disasters, causing an estimated $25 billion in damage.

Monday's quake caused damage in Wellington, the capital, and was also strongly felt in Christchurch. Residents said the shaking went on for about three minutes.

Police said one person died in Kaikoura and another in Mt. Lyford, a nearby ski resort. Several other people suffered minor injuries in Kaikoura, police spokeswoman Rachel Purdom said.

Prime Minister John Key flew over the destruction in Kaikoura by helicopter as aftershocks kicked up dust from the landslides below. Cars could be seen lying on their sides and parts of the road were clearly impassable.

"It's just utter devastation," Key said.

He later toured the area and met with locals. He estimated the cleanup effort would run into the billions of dollars and said clearing the debris and blocked roads could take months.

Kaikoura resident Terry Thompson said he was out of town when the quake struck but managed to reach his wife on her cellphone before the phone died.

"She said the glass exploded right out of the double ranch-slider," he said. "The neighbor's chimney was gone, there were breakages and things smashed everywhere."

Thompson said his wife helped a 93-year-old neighbor and a tourist into her car and drove to higher ground.

"They stayed in the car all night but couldn't sleep," Thompson said. "They're all very, very tired and concerned about the state of their property."

Video taken from a helicopter near Kaikoura showed three cows stranded on an island of grass in a paddock that had been ripped apart in the quake. The patch of grass was surrounded by deep ravines of collapsed earth, trapping the animals where they stood.

The quake temporarily knocked out New Zealand's emergency call number, 111. In Wellington, it collapsed a ferry loading ramp, broke windows and caused items to fall from shelves. It also forced hundreds of tourists onto the streets as hotels were evacuated.

Australians Paul and Sandra Wardrop and their children, Alexander, 15, and William, 12, were on the 10th floor of the Park Hotel when the shaking began.

"We felt that the building was going to collapse," Sandra Wardrop said. "You could hear the sounds of the building shaking and see cracks appearing in the walls, in the plasterwork in the bedroom."

The family was among dozens of people who took shelter in the capital's parliamentary complex, which threw open its doors.

Police, meanwhile, stepped up their patrols after receiving several reports of burglaries in homes and businesses that had been evacuated due to the quake.

Authorities in Wellington told people who work in the city's central business district to stay home on Monday. Officials said some large buildings were showing signs of structural stress. The city's suburban rail network was shut while crews checked tracks, bridges and tunnels.

New Zealand, with a population of 4.7 million, sits on the "Ring of Fire," an arc of seismic faults around the Pacific Ocean where earthquakes are common.

The location of Monday's quake largely helps explain why the damage was so minimal compared to the 2011 temblor, said Mark Quigley, associate professor of active tectonics at the University of Melbourne in Australia.

The 2011 quake was located almost directly beneath Christchurch, meaning tens of thousands of people were exposed to the most violent shaking at the epicenter. Monday's quake was centered in a rural area that is home to just a few thousand people.

The 2011 quake also had a tremendous amount of high-frequency energy, including very strong vertical ground motions that felt "like you're being picked up by a giant and being shaken around," Quigley said.

But for those in Christchurch on Monday, the shaking felt very different -- more of a rolling motion. "They were far enough away that a lot of that high-frequency energy was dissipated," Quigley said.

The quake was centered 57 miles northeast of Christchurch at a depth of 14 miles, according to the U.S. Geological Survey. The USGS initially estimated it had a magnitude of 7.4 before revising it to 7.8.