People gather on high ground in Whangarei, New Zealand, as a tsunami warning is issued Friday, March 5, 2021. A powerful magnitude 8.1 earthquake struck in the ocean off the coast of New Zealand prompting thousands of people to evacuate and triggering tsunami warnings across the South Pacific. (Mike Dinsdale/New Zealand Herald via AP)

One of the strongest earthquakes to hit the South Pacific in modern history triggered tsunami warnings across the ocean and forced thousands of people in New Zealand to evacuate coastal areas Friday. Small tsunami waves were seen, but little damage was apparent hours later.

The magnitude 8.1 in the Kermadec Islands region about 1,000 kilometers (620 miles) from New Zealand's two main islands was the largest in a series of temblors over several hours, including two earlier quakes that registered magnitude 7.4 and magnitude 7.3.

The threat caused traffic jams and some chaos in New Zealand as people scrambled to get to higher ground.

Residents recorded videos of small wave surges in some places, including at Tokomaru Bay near Gisborne. In the afternoon, the National Emergency Management Agency said the threat had passed and people could return to their homes, although they should continue avoiding beaches.

One of the earlier quakes hit much closer to New Zealand and awoke many people as they felt a long, rumbling shaking. "Hope everyone is ok out there," New Zealand Prime Minister Jacinda Ardern wrote on Facebook during the night.

After the largest quake, civil defense authorities in New Zealand told people in some coastal areas to immediately get to higher ground. They said a damaging tsunami was possible, and waves could reach up to 3 meters (10 feet).

People gather on high ground and check for any sign of a tsunami near Whangarei, New Zealand, Friday, March 5, 2021. A powerful magnitude 8.1 earthquake struck in the ocean off the coast of New Zealand prompting thousands of people to evacuate and triggering tsunami warnings across the South Pacific. (Karena Cooper/New Zealand Herald via AP)

Emergency Management Minister Kiri Allan told reporters that people had followed the advisory.

"They felt the long or strong earthquakes and they knew to grab their bag and head into the highlands," she said. "I can only thank and acknowledge the tireless efforts of the men and women from up and down the coast who knew how to act, when to act, and what to do."

The Pacific Tsunami Warning Center cautioned the quake could cause tsunami waves of up to 3 meters (10 feet) in Vanuatu and up to 1 meter (3 feet) in Tonga, other South Pacific islands and Latin America's Pacific coast.

Chilean authorities ordered people off beaches due to the potential for a tsunami along the nation's long coastline. Guatemala issued a tsunami alert, and authorities in El Salvador ordered people to take precautions in recreational activities. Mexico said there was no threat.

People walk up a hill above Papamoa Beach, New Zealand, as a tsunami warning is issued Friday, March 5, 2021. A powerful earthquake struck in the ocean off the coast of New Zealand prompting thousands of people to evacuate and triggering tsunami warnings across the South Pacific. (George Novak/New Zealand Herald via AP)

Waves of 30 centimeters (1 foot) above tide levels were measured by ocean gauges off the Pacific nation of Vanuatu, off Gisborne, New Zealand, and off an Australian island. Smaller waves were measured elsewhere in the South Pacific.

The U.S. Geological Survey said the strongest quake was centered near the Kermadec Islands at a depth of 19 kilometers (12 miles).

Although the islands are uninhabited, New Zealand has built research and accommodation facilities there and often had scientists cycling through until the coronavirus hit last year and it halted the program. But a large group of more than 100 people including scientists and students was due to stay on the islands this week, until they were forced to cancel because of a virus lockdown in Auckland, said a spokesperson from the Department of Conservation.

Traffic slowly works up to high ground at Whangarei, New Zealand, as a tsunami warning is issued Friday, March 5, 2021. A powerful magnitude 8.1 earthquake struck in the ocean off the coast of New Zealand prompting thousands of people to evacuate and triggering tsunami warnings across the South Pacific. (Mike Dinsdale/New Zealand Herald via AP)

The USGS said in a report that the quake occurred at the intersection of the Pacific and Australia and eclipsed the largest quake previously recorded along the fault line, a magnitude 8.0 in 1976.

It said the interaction between the plates creates one of the most seismically active regions in the world, and it has recorded 215 quakes there above magnitude 6.0 over the past century.

Jennifer Eccles, an earthquake expert at the University of Auckland, said the quake was at the top end of the scale for those involving only the Earth's ocean crust.

"This is about as big as it gets," she said.

She said most quakes larger than magnitude 8.0 tend to occur when a section of more robust continental crust is involved.

The USGS said the magnitude 7.4 quake was likely a "foreshock" that contributed to the larger quake but that the first quake that hit closer to New Zealand was too far away in time and distance to have directly contributed.

  • People watch for signs of a tsunami from a hill above Papamoa Beach, New Zealand, as a tsunami warning is issued Friday, March 5, 2021. A powerful earthquake struck in the ocean off the coast of New Zealand prompting thousands of people to evacuate and triggering tsunami warnings across the South Pacific. (George Novak/New Zealand Herald via AP)

  • Traffic slowly works up to high ground in Whangarei, New Zealand, as a tsunami warning is issued Friday, March 5, 2021. A powerful magnitude 8.1 earthquake struck in the ocean off the coast of New Zealand prompting thousands of people to evacuate and triggering tsunami warnings across the South Pacific. (Mike Dinsdale/New Zealand Herald via AP)

  • John Fitzgerald, left, on holidays with his wife Rita and friends, scans the horizon from high ground for any sign of a tsunami near Waitangi, New Zealand, Friday, March 5, 2021. A powerful magnitude 8.1 earthquake struck in the ocean off the coast of New Zealand prompting thousands of people to evacuate and triggering tsunami warnings across the South Pacific. (Peter De Graaf/New Zealand Herald via AP)

  • A firetruck tells people along the road, through a public address system (PA) to move to higher grounds following a tsunami warning for American Samoa in Pago Pago, Thursday, March 4, 2021. The Pacific Tsunami Warning Center cancelled a tsunami watch for Hawaii that was issued after a huge earthquake occurred in a remote area between New Zealand and Tonga. The agency previously cancelled a tsunami warning it had issued for American Samoa. (AP Photo/Fili Sagapolutele)

  • Traffic leaves the Port of Pago Pago after closing because a tsunami warning was issued for American Samoa on Thursday, March 4, 2021. The Pacific Tsunami Warning Center cancelled a tsunami watch for Hawaii that was issued after a huge earthquake occurred in a remote area between New Zealand and Tonga. The agency previously cancelled a tsunami warning it had issued for American Samoa. (AP Photo/Fili Sagapolutele)

The first quake was centered at a depth of 21 kilometers (13 miles) under the ocean about 174 kilometers (108 miles) northeast of the city of Gisborne.

It was widely felt in New Zealand, and residents in the major cities of Auckland, Wellington and Christchurch reported being shaken awake.

In 2011, a 6.3 quake hit the city of Christchurch, killing 185 people and destroying much of its downtown.