Last night, a magnitude 7.9 earthquake struck southeast of Kodiak Island in the Gulf of Alaska, prompting a tsunami warning that forced people to flee to higher grounds in the middle of the night. Fortunately, the tsunami waves were less than a foot high, and the advisories were canceled a little after 4AM local time. So why was Alaska so lucky?

Powerful quakes that happen out at sea are known to cause destructive tsunamis. In 2011, a magnitude 9 earthquake in northeastern Japan triggered waves as high as 126 feet, killing nearly 20,000 people. In 2004, a similarly strong quake off the coast of Indonesia caused a tsunami that killed more than 200,000 people. Alaska also has a history of strong earthquakes: in 1964, the state experienced the most powerful quake ever recorded in the US, a 9.2 magnitude tremor followed by a tsunami that killed over 100 people.

“Alaska is no stranger to these kinds of quakes,” says Don Blakeman, a geophysicist with the US Geological Survey (USGS).

“Alaska is no stranger to these kinds of quakes.”

Earthquakes occur because the Earth’s crust is divided into plates. These plates can move smoothly against each other or become stuck. When they become stuck, they build up strain over time, until one day, the plates unstick, releasing energy that causes an earthquake. Just south of Alaska, the Pacific plate is sliding underneath the North American plate, an area called the subduction zone. That’s why the state is highly seismic, Blakeman tells The Verge.

Last night’s earthquake generated because of all the strain building up on the subduction zone, but it did not occur exactly on a fault where the Pacific Ocean seafloor is sliding under the North American plate, Blakeman says. Instead, the quake occurred a little farther out, in a place where the fault is moving horizontally. This type of quake, called a strike-slip earthquake, is less likely to trigger large tsunamis, and this is probably why Alaska only saw waves of less than a foot, according to Blakeman.

When earthquakes happen on the subduction zone itself, where one plate is pushing down while the other is going up, then high waves form. “To get a tsunami, you have to have substantial vertical movement on the seabed,” Blakeman says. Those types of earthquakes were responsible for the massive tsunamis in Japan and Indonesia.

Aftershocks in Alaska could continue for weeks or months, Blakeman says. If the quakes generate from the same zone as last night, then large tsunamis should not be expected. But because the state sits by the Pacific-North America plate boundary, it’s normal that new earthquakes will happen in the future. When and where, exactly? That’s impossible to say. Earthquakes are so complicated that scientists aren’t able to predict them — at least not yet.

“Since we can’t predict them, all we can do is be prepared,” Blakeman says.