ANCHORAGE, Alaska -- People in Alaska were jolted awake overnight Tuesday. First by a powerful earthquake in the Gulf of Alaska – then by sirens that warned of a possible tsunami.

A magnitude 7.9 earthquake struck at 12:32 a.m. off the Alaska coast. The quake itself -- far enough away not to cause major damage.

But in the worst spot there was a potential tsunami.

"Attention, a tsunami warning has been issued for this area," officials warned over loudspeakers.

Within minutes, the roads in the seaside town of Kodiak, Alaska, were filled cars heading to higher ground.

"This is not a drill! This is an actual tsunami warning. Everybody get to at least 100 feet above sea level," officials said on a video posted on social media.

That warning covered not only most of coastal Alaska, but also the entire coast of British Columbia. Tsunami watches were posted from Washington state to California -- and even Hawaii and as far away as American Samoa.

For two harrowing pitch-black hours, many braced for the worst.

Vehicles are seen evacuating Kodiak, Alaska in wake of tsunami warning issued after powerful earthquake 175 miles southeast of Kodiak Island early on January 23, 2018 @Jupiter00000

But by 4 a.m. -- less than four hours after the quake hit -- all warnings were lifted. The only tsunami was an 8-inch wave in Kodiak.

Still, almost every Alaskan felt the initial jolt.

Peter Haeussler CBS News

Geologist Peter Haeussler, who's based in Anchorage, says even though a major tsunami didn't materialize, this was hardly a false alarm.

CBS News asked him due to the nature of the quake if it could have been much worse.

"It sure could've," Haeussler said. "In the early moments after the earthquake occurred, we really wondered if there was going to be a bad tsunami afterward."

Tuesday morning's earthquake happened where the floor of the Pacific Ocean is slowly sliding under the North American continent. That's the same spot which saw the second largest earthquake ever recorded: A 9.2 magnitude in March 1964.