Soon after he got home Wednesday evening, Leland O'Driscoll, a manager with the Pacific Northwest Seismic Network, pulled out his laptop and began monitoring the seismographs sprinkled around Oregon.

Just after 5:24 p.m., an alarm blared and a digitized voice spilled out of his computer in urgent tones.

"Earthquake! Earthquake!"

The ground had begun to shake south of Mollala and the energy from the quake would reach O'Driscoll's home in seconds, his screen showed.

The magnitude 4.0 temblor wasn't strong enough to be felt in Eugene, where O'Driscoll lives and works out of the University of Oregon, but the early warning was valuable nonetheless.

"It was a good demonstration of how this technology works," he said, referring to the state's ShakeAlert system, a series of seismographic sensors carpeted over the state that can give users of the system an early warning when a quake hits.

(The video below shows what a user alert might look and sound like.)

PRECIOUS TIME TO ACT

Earthquakes happen when a fault in the earth's crust slips and the land on either side of the fault moves relative to one another. The shaking is waves of energy radiating out from the spot on the fault line where the rupture occurs

Two types of energy travel outward from the epicenter: primary waves, or p-waves, and secondary waves, or s-waves. The p-waves travel faster and usually don't cause much shaking or destruction. Using those initial p-waves, sensors can detect the strength of a quake, relay the message to an earthquake alert center and create a warning, allowing seconds or even minutes for people to prepare before the stronger s-waves arrive.

For O'Driscoll, he had 22-seconds notice that the energy from Wednesday night's quake was on its way. Farther north, where the quake was felt, anyone in Salem using the system would have had 3 seconds to prepare. In Portland, the alert would have given people 8 seconds of warning.

That might not seem like much time, but it could give enough warning to move away from a window, get under a desk or avoid a heavy bookcase that could topple in a quake. For public infrastructure, that could be enough time to slow or stop a train, trigger automatic gas shut off valves or warn people to take cover.

A PROVEN TRACK RECORD

A number of other countries already have earthquake detection systems in place, including Mexico, Turkey and China. In Japan, the country invested some $600 million in the system after the 1995 Kobe earthquake killed more than 6,000 people.

When the magnitude 9.0 Tohoku earthquake struck in 2011, not a single train in the entire country derailed, thanks to the early warning system.

Nearly all of the countries that can detect earthquakes before the shaking starts implemented the system in response to a costly and destructive event.

"In many of those cases, those countries built those early warning systems after a major earthquake," Doug Toomey, a University of Oregon seismology professor, told The Oregonian/OregonLive last year. The U.S. is trying to build out the system before the next quake. Toomey said the sensors will ideally be spaced out every 20 kilometers from Cape Mendocino in California to Vancouver Island in British Columbia. There are currently about 400 sensors in Oregon and Washington, Toomey said.

MORE INVESTMENT NEEDED

The system along the West Coast is still in development, according to the U.S. Geological survey, but has already detected two earthquakes that caused damage. An alert was generated within four seconds for the magnitude 5.1 La Habra earthquake that struck in southern California in March of 2014. In northern California, users of the test system got five seconds of warning before the shaking from the South Napa quake reached them in August of 2014.

Last year, UO received a $237,000 grant from the U.S. Geological Survey, part of $3.7 million awarded to a handful of universities across the West to bolster the system.

But the geological survey estimated it will cost more than $38 million to finish the early-detection system and create a public alert. Annual operations and maintenance cost for the detection system could exceed $16 million.

The system will need significant investment from government agencies on local, state and federal levels as well as from private companies and the public before it comes fully operational, according to the geological survey.

NOT IF, BUT WHEN

The slight soil shaker that wobbled underneath Mollala Wednesday night may have brought back some memories for longtime Oregonians.

The magnitude 4.0 earthquake that hit about 30 miles south of Portland didn't cause any major damage or injuries, but it hit in the exact same area as a stronger quake that shook the area in 1993 — a magnitude 5.6 temblor, which hit at 5:34 a.m., known officially as the Scotts Mills earthquake and unofficially as the Spring Break quake.

That quake was far more destructive than Wednesday evening's earthly rumbling.

It lasted for roughly 45 seconds and was felt as far north as Seattle, jolting awake residents of Portland and Salem. The state capitol and Molalla High School were both seriously damaged. A bridge near Dayton was also damaged and had to be closed.

All told, damage estimates reached about $28 million in 1993 dollars. Fortunately, no one was killed and only a few people were injured. O'Driscoll said the maximum output for the Mount Angel fault, where both quakes occured, is about a magnitude 6.0.

But that pales in comparison to what could happen if and when the Cascadia Subduction Zone ruptures.

If the entire fault were to slip, it could unleash a magnitude 9.0 quake, cause tens of thousands of deaths and an ensuing tsunami could obliterate much of the Pacific Northwest coastline.

The last time the subduction zone saw a major quake where the entire zone ruptured, which scientists have been able to pin down because it caused a tsunami that traveled across the Pacific ocean to Japan, was in 1700, 316 years ago.

Experts say the chances of a quake hitting the central Oregon region of the Cascadia Subduction Zone in the next 50 years are between 15 and 20 percent.

-- Kale Williams

kwilliams@oregonian.com

503-294-4048