People line the hallway at Sitka High School Tuesday, Jan. 23, 2018, in Sitka, Alaska after tsunami sirens and cell phone messages told residents to find higher ground after a 7.9 magnitude earthquake struck in the Gulf of Alaska. (James Poulson/Daily Sitka Sentinel via AP)
People line the hallway at Sitka High School Tuesday, Jan. 23, 2018, in Sitka, Alaska after tsunami sirens and cell phone messages told residents to find higher ground after a 7.9 magnitude earthquake struck in the Gulf of Alaska. (James Poulson/Daily Sitka Sentinel via AP) Credit: JAMES POULSON

ANCHORAGE, Alaska — A powerful undersea earthquake sent Alaskans fumbling for suitcases and racing to evacuation centers in the middle of the night after a cellphone alert warned a tsunami could hit communities along the state’s southern coast and parts of British Columbia.

The monster waves never materialized, but people who fled endured hours of tense waiting at shelters before they were cleared to return home.

“This was a win as far as I could tell,” said Marjie Veeder, clerk for the city of Unalaska, which is home to the international fishing port of Dutch Harbor in the Aleutian Islands. “We got advance warning and were so thankful for that.”

The magnitude 7.9 quake in the Gulf of Alaska triggered the jarring alert that roused people shortly after midnight Tuesday. Fleeing motorists clogged some highways in their rush to higher ground. Many took refuge at schools or other shelters.

Even for Alaskans accustomed to tsunami threats and tsunami drills, the phone message was alarming. It read: “Emergency Alert. Tsunami danger on the coast. Go to high ground or move inland. Listen to local news.”

There were no reports of damage, not even on Kodiak Island, the closest land to the epicenter. Only after the all-clear was sounded did a little levity emerge. In Kodiak, a customer’s Facebook post suggested a post-evacuation meal at King’s Diner: “Hungry? Tsunami got you up early?”

The temblor reminded King of a deadly 1964 quake that generated tsunamis that killed 129 people and wreaked widespread devastation — events that remain vivid in the memories of many Alaskans.

“It started out just like the big one,” she said. “It was very slow and rolling, a good resemblance to the big one. That’s what scared us.”

Tuesday’s quake was recorded at 12:32 a.m. in the Pacific Ocean about 170 miles southeast of Kodiak, home to one of the nation’s largest Coast Guard bases.

It prompted the warning across thousands of miles of Alaska’s southern coast, from Attu in the Aleutian Islands to Canada’s border with Washington state. Kodiak is about 200 miles south of Anchorage, the state’s largest city, which was not under a tsunami threat.

The state has an active tsunami-readiness program, and many communities have sirens and evacuation plans.

People reported on social media that the quake was felt hundreds of miles away, in Anchorage. Reports varied about how long the quake’s shaking lasted, depending on location.

In the popular cruise-ship town of Seward, about 110 miles south of Anchorage, Fire Chief Eddie Athey said the quake felt like a gentle rattle that lasted for up to 90 seconds.

“It went on long enough that you start thinking to yourself, ‘Boy, I hope this stops soon because it’s just getting worse,’” Athey said.

The Alaska Earthquake Information Center categorized the shaking as light.

The quake was a type that usually produces less vertical motion, which means less chance for waves to build for a tsunami, said Paul Earle, a seismologist with the U.S. Geological Survey. That was somewhat unusual, because quakes in the area usually are a type that cause more vertical motion and increase the chance for a tsunami, he said.