A tsunami warning spurred by a powerful earthquake pushed Alaskans from their beds in the middle of the night and left western Canada and the US West Coast on edge before the threat was declared over.

Authorities issued tsunami warnings for a large stretch of Alaska and British Columbia after midnight, reacting to an 7.9-magnitude earthquake that reverberated in the Gulf of Alaska and placed much of the US West Coast under a tsunami watch that urged residents to stay alert for impending danger.

Widespread anxiety gave way to relief as the threat receded and officials began lifting advisories. Rather than the potentially devastating walls of water residents were told to brace for, the government reported waves of less than a foot in Alaska’s waters – hours after residents had been urged to expect the worst.

“A tsunami with damaging waves and powerful currents is possible,” a government tsunami warning had cautioned, spotlighting the risk of “repeated coastal flooding”, formidable flooding that could drown people or destroy property and waves that could last up to 45 minutes.

“Water filled with floating or submerged debris that can injure or kill people and weaken or destroy buildings and bridges is possible,” the alert said.

People closest to the quake’s epicentre were advised to move to higher elevations or to seek shelter on upper floors of buildings. Residents of Kodiak, Alaska, were roused from their sleep as authorities activated warning sirens at around 1am local time [10am GMT], with some sharing videos of alarms blaring as their neighbourhoods remained cloaked in darkness.

A Day That Shook The World: Asian Tsunami Show all 3 1 /3 A Day That Shook The World: Asian Tsunami A Day That Shook The World: Asian Tsunami In this handout photo from the U.S. Navy, a view of the landscape after the tsunami swept through over Banda Aceh on January 1, 2005 in Sumatra, Indonesia. Getty Images A Day That Shook The World: Asian Tsunami This still grab taken 29 December 2004 from video shot 26 December 2004 shows a wave sweeping away a house in Banda Aceh following the earthquake and tsunami that hit off the Sumatra coast. In a horriying home video shot by one family trapped in the direct path of Sunday's disaster, the 30 minutes which led to the destruction of an entire coastline were captured as the camera kept rolling throughout their ordeal. Getty Images A Day That Shook The World: Asian Tsunami An aerial shot taken from a helicopter shows a house standing amid debris of houses destroyed by tsunamis in the Galle district in the southwestern coast of Sri Lanka, 27 December 2004. Getty Images

“DO NOT RETURN TO YOUR HOMES,” an alert sent at 2:19 am by the Kodiak Police Department read. “REMAIN AT HIGHER GROUND UNTIL FURTHER NOTICE”.

Some Alaskans reported long lines of cars as people sought to heed the warnings and find safer places to wait out the threat. A Kodiak resident told the Anchorage Daily News that “pretty much everyone in town” drove up the slopes of a local mountain.

Nathaniel Moore, who was in Kodiak when the earthquake hit, told CNN that he felt it “shake really good for a minute”.

Residents of the US West Coast, from California’s border with Mexico to Washington state, were briefly living under a tsunami watch that initially predicted a tsunami’s effects that could batter cities in the early morning hours.

San Francisco’s emergency services department issued pre-dawn alerts in multiple languages urging residents close to the San Francisco Bay or the ocean to prepare to evacuate.

An official warning from the city of Victoria, the capital of Canada’s British Columbia region, instructed people within two blocks of the water to move inland and advised that waves would begin crashing into the area shortly before 6 am.

“Move out of the water, off the beach & away from harbours, marinas, breakwaters, bays & inlets,” an advisory instructed.

Authorities began lifting official warnings as it became clear hazardous waves had not materialised. In the aftermath, Kodiak’s emergency services director Mike Tvenge described a relatively seamless process of alerts pushing residents to safety.

“We told people to evacuate from low-lying areas, which they did orderly,” he said. “I want to thank everyone for orderly evacuation”.

But Sen Dianne Feinstein of California used the occasion to call for better safeguards against natural disasters, suggesting her state’s populous coastal hubs were unprepared for the debilitating earthquake that seismologists believe is inevitable.