A tsunami warning for coastal British Columbia and parts of Alaska has ended after a powerful earthquake struck about 250 kilometres southeast of Chiniak, Alaska, early today.

The quake struck at 1:31 a.m. PT Tuesday and prompted a tsunami warning for the entire B.C. coast and a tsunami watch for the entire U.S. West Coast.

The magnitude 7.9 earthquake prompted warnings of a possible tsunami down the B.C. coast. (CBC)

People gather at a reception centre in Tofino, B.C. (Catherine Lempke/Twitter)

In Port Alberni, a city that was devastated by a tsunami in 1964, Mayor Mike Ruttan activated the four tsunami sirens at around 3 a.m. PT, alerting 17,000 residents to move to higher ground.

"The warning was repeated every 10 minutes for two minutes [in duration]. They're very loud, there's no way you can ignore them. And then in between time, the paper mill was blowing its horns for extended periods of time to let people know there was civic emergency."

Hear the sound of the sirens below:

Ruttan said although the city could have communicated better on social media, the evacuation was orderly.

"I am pleased with the response for the most part," he said.

In Tofino, on the west coast of Vancouver Island, warning sirens were activated on the two main beaches in town, and hundreds of people evacuated to the emergency reception centres at the community hall and an elementary school.

"Everything has proceeded in a really orderly fashion," said Tofino Mayor Josie Osborne. "This is why we train, this is why we do exercises and this is why spend time making emergency plans and then testing them."

The provincial emergency systems worked the way it was supposed to, said B.C.'s public safety minister.

<a href="https://twitter.com/hashtag/Tsunami?src=hash&ref_src=twsrc%5Etfw">#Tsunami</a> Warning previously issued for coastal areas of <a href="https://twitter.com/hashtag/BC?src=hash&ref_src=twsrc%5Etfw">#BC</a> has been CANCELLED. Continue to listen to instructions from local officials until the ALL CLEAR has been issued in your community. —@EmergencyInfoBC

"Whether it was in Esquimalt where we saw firefighters and first responders going door to door, or... Queen Charlotte City which was fully evacuated, or the sirens in Tofino and Ucluelet, and people going to their local emergency centres, people responded admirably and I think the emergency services did a remarkable job," said Mike Farnworth.

The U.S. Geological Survey initially reported the quake's strength at 8.2 early Tuesday and later revised that to 7.9, with a depth of 25 kilometres. At least three aftershocks were reported.

Luckily, most of the displacement on the ocean floor was horizontal, not vertical..one of the reasons we didn't get a large damaging tsunami. But this was the best kind of test for BC emergency officials... and for all of us to know what to do next time. Get your kits/plan ready —@JWagstaffe

"This is a place in the world where we see historically a lot of large earthquakes," said CBC seismologist Johanna Wagstaffe.

Wagstaffe said early data showed the movement of tectonic plates under the ocean was more of a side-to-side motion than what's known as a mega-thrust.

"Mega thrusts are the ones we really worry about when it comes to widespread and large tsunamis because there is so much more vertical displacement of the ocean floor," she said.

"Side-to-side can definitely still generate a tsunami, and again we are seeing a small one, but this motion doesn't generate as large of a tsunami as what we would get with a mega-thrust."

If you are in a <a href="https://twitter.com/hashtag/tsunami?src=hash&ref_src=twsrc%5Etfw">#tsunami</a> warning area, move out of the water, off the beach & away from harbors, marinas, breakwaters, bays & inlets. Follow instructions from your local emergency officials because they may have more detailed or specific information for your location. —@EmergencyInfoBC

Emergency Info BC, directed by the province's lead agency for disaster management, said the warning did not include Vancouver.

Tue Jan 23 09:38:01 UTC 2018 event picture <a href="https://t.co/AHbKZ8xPuJ">pic.twitter.com/AHbKZ8xPuJ</a> —@NWS_NTWC

Emergency Info BC warned people in the affected area to move away from the water, off beaches, and away from harbours, marinas, breakwaters, bays and inlets. Boat operators were advised to move their boats out to sea to a depth of at least 55 metres.

<a href="https://twitter.com/hashtag/tsunami?src=hash&ref_src=twsrc%5Etfw">#tsunami</a> warning for BC notification zones A, B, C & D. More information from Environment Canada: <a href="https://t.co/y28IfBkpdm">https://t.co/y28IfBkpdm</a> <a href="https://t.co/JJrBei92v5">pic.twitter.com/JJrBei92v5</a> —@EmergencyInfoBC

Trevor Jarvis, the emergency co-ordinator for the Village of Masset on the north end of Haida Gwaii, said he sent out an emergency text to residents and set off the tsunami emergency siren just after 2 a.m. on Tuesday. Everyone on the north end of the village was told to get to higher ground.

Hundreds gathered on Mt Tolmie after <a href="https://twitter.com/hashtag/tsunami?src=hash&ref_src=twsrc%5Etfw">#tsunami</a> warning head home after <a href="https://twitter.com/environmentca?ref_src=twsrc%5Etfw">@environmentca</a> lifts alert <a href="https://twitter.com/hashtag/yyj?src=hash&ref_src=twsrc%5Etfw">#yyj</a> <a href="https://t.co/cTEw0bDUn1">pic.twitter.com/cTEw0bDUn1</a> —@NicoleCrescenzi

The quake struck 280 kilometres southeast of Kodiak, Alaska. People reported on social media that it was felt hundreds of kilometres away in Anchorage. Some said they saw the water retreating in Kodiak harbour, a possible sign that strong waves could return.

However, Kodiak police later said the tsunami warning was downgraded to advisory. They also said they received two reports that tide levels in the channel were fluctuating "by six inches to one foot."

The U.S. Pacific Tsunami Warning Centre issued a tsunami watch for the state of Hawaii that was soon cancelled.