Sirens and officials banging on doors roused people from their sleep in the middle of the night Tuesday in British Columbia as a tsunami warning was issued along a large swath of the province's coastline after a powerful earthquake in the Gulf of Alaska.

The warning was lifted about three hours later, ending a tense period for some as they made their way to safety on higher ground.

“I just heard the fire trucks going around, honking their horns and on the loud speaker saying there is a tsunami warning,” said Gillian Der, a University of British Columbia geography student who is studying in Queen Charlotte on Haida Gwaii. “It was very apocalyptic. So I was just running up the street to the muster station, up the big hill.”

Tofino Mayor Josie Osborne was ready in a few minutes to leave her home on the west coast of Vancouver Island after getting a warning text but said she pondered what shoes to wear in case she wouldn't ever be back.

When the warning was lifted it “was a great sense of relief. You prepare for the worst and you hope for the best and that's what happened,” she said.

The quake with a magnitude of 7.9 struck at about 1:30 a.m. Pacific time. It was centred 278 kilometres southeast of Kodiak, Alaska, at a depth of about 10 kilometres.

Earth sciences Prof. Brent Ward of Simon Fraser University said it didn't produce a tsunami because it was a strike-slip earthquake, where the plates slip sideways past each other.

“To get a tsunami, you have to have vertical movement of the sea floor and that more often occurs in what we call a thrust fault ... where one of the plates is moving over top of the other.”

Ward said when a plate moves up very quickly, that displaces the water above it, setting off a tsunami.

“It looks as though this earthquake was triggered on what we would call a transcurrent fault in the oceanic plate that is going underneath North America,” he said.

Public Safety Minister Mike Farnworth said several B.C. communities activated their emergency plans and evacuated those at risk as the provincial emergency co-ordination centre and five regional operations centres were also mobilized.

More: Why didn't tsunami strike Vancouver Island? Q&A with seismic expert

In low-lying areas of Victoria and Esquimalt, officials went door-to-door telling people to evacuate, while elsewhere sirens and text alerts were used to get the warning out, he said in an interview.

“Although the tsunami warning was eventually suspended, this event demonstrates that coast warning systems do work.”

Emergency Preparedness BC said there was a three centimetre wave and a 15 centimetre rise in sea level hours after the quake at Tofino.

Faye Kennington said she woke up at around 3 a.m. to a sound that she thought might be her hair dryer or refrigerator on its last legs. But when she checked her phone, she saw a number of alerts and realized a tsunami warning was underway.

“I grabbed my stuff, woke up all my family, we jumped in the car and went to high ground,” she said. “It was panic. It was scary.”

Kennington, who operates the Coast and Toast B&B in Ucluelet, drove to the local high school where residents were gathered and began calling friends who might not have woken up.

She said there are a lot of excellent volunteers in Ucluelet who help during emergencies, but the warning system could be stronger.

“Our siren is not really loud enough to wake everybody up, so we need multiple systems to make sure people don't fall through the cracks,” she said.

Kennington said she has an emergency bag prepared that includes food, a first aid kit, cash and passports. After this experience, she's planning to add a dog leash and some toothbrushes.

“Sitting there at the school at four o'clock in the morning not having brushed my teeth made me realize I really do like to brush my teeth,” she said. “Maybe a pack of gum won't hurt either.”

Other Ucluelet residents woke up to police officers or firefighters banging on their doors. Gary Bostrom, who has lived in the coastal community for 30 years and lived through many false alarms, said he heard the knocking at 4 a.m. and reluctantly began trudging up the hill to the school.

There was bumper-to-bumper traffic and cars parked everywhere, he said. By the time he arrived at the school at 4:45 a.m., the warning had been cancelled and exhausted-looking people were flooding out of the building toward their vehicles.

“It was like 'Night of the Living Dead,' ” he said with a chuckle.

In nearby Tofino, some residents also questioned whether to take the alarm seriously. Nick Jacquet said he was sound asleep at 2:30 a.m. when he was rudely awakened by the siren. He's been through at least four warnings before and doesn't usually go to higher ground, he said.

“I wasn't scared. I was just feeling bothered,” he said. “It was sort of like, 'Oh gosh, do I have to do this?' ”

But when the sirens continued, he grabbed his dog and a blanket, drove to the top of a hill and tried to sleep until the warning was cancelled.

Jacquet, who owns the Tofino Travellers Guesthouse, said he knows people who stayed at home the whole time. Officials are going to have to deal with the fact that residents may not take future warnings seriously, given that the last few have been false alarms, he said.

“You get woken up at two o'clock in the morning from an alarm system. Do you do anything about it?” he asked.

“You're in a great sleep. You maybe ordered sangria and they're bringing that to your little chair on the beach. What would you do? Stay with that one, or get up and throw your clothes on and get outside and go to the safe spot?”

- With files from Laura Kane.