There’s a 93 percent chance that, in the next 30 years, an earthquake as big—or bigger—as the deadly Northridge quake will strike Los Angeles again.

Those odds pushed the city of Los Angeles to pioneer the development of an earthquake early warning system that would give Angelenos up to a minute’s warning before a quake.

Beta-testers of the app have been able to experience how well the technology works over the last few months. Today, when the app issued an alert about a 4.4 earthquake epicentered near La Verne, people throughout the LA region were given a push notification that gave up to 12 seconds notice before shaking started.

UPDATE: Earthquake early warning app now available for LA

Anyone feel that earthquake? Got the alert but this time only had 12 seconds! pic.twitter.com/7J21oPhXhA — Alissa Walker (@awalkerinLA) August 29, 2018

The app could finally be ready for LA smartphones before the end of the year, say Josh Bashioum and Chase Rief, who are working on the app at Early Warning Labs, a Santa Monica-based technology firm partnered with the United States Geological Survey (USGS).

Early warning systems are already widely adopted in countries such as Japan and Mexico, where Mexico City residents got up to 60 seconds’ notice before an 8.1 in September.

“Why do Mexico and Japan have this? They developed it after they had huge losses,” says Rief. “We want to implement it before we do.”

An early warning system has been in development for more than a decade in the U.S., with some local agencies, including Metro and the mayor’s office in Los Angeles, already using the real-time alert data. But USGS had lacked the funds to build out the sensor network and create an app the public can use.

Last year, cuts to the federal budget threatened to zero out the $10 million annually that’s needed to develop the app for the public, but local reps fought to keep the funds in place. Governor Jerry Brown also kicked in some money from the state.

In his state of the city address in April, Mayor Eric Garcetti said the rollout of the early warning system will go hand-in-hand with the city’s sweeping seismic retrofit program.

“By the end of 2018, we will deploy an earthquake early warning system to every corner of this city, in schools, at businesses, even on your smartphone,” he said. “It will give you a head start when an earthquake is coming—precious seconds that save lives.”

Some government agencies in California have been getting alerts for years. San Francisco region’s transit agency, BART, was the first transit agency in the U.S. to use early warning data to stop or slow trains when a tremor is reported. Now LA’s Metro is using the early warning data as well.

Using the data, Metro and USGS have organized multiple drills where all local trains have been stopped simultaneously. USGS has also partnered with Los Angeles Unified School District, which will eventually have warning systems installed at each school, and it’s looking for more businesses and corporations, like current partner NBC Universal, to help test early warnings in office buildings and public spaces.

While the larger industrial applications for the early warning system, like de-energizing high-power electrical lines or depressurizing gas mains, are helpful to prevent secondary catastrophes, much of what makes earthquakes losses so costly are simple, preventable injuries, says Rief.

In the 1994 Northridge earthquake, more than 50 percent of injuries were due to non-structural hazards, like windows or masonry falling down, according to a UC Berkeley study.

Giving people a few seconds to get away from a glass window and under a table, for example, could greatly reduce or eliminate a majority of those injuries, freeing up first responders to address other crises.

Another simple yet critical benefit that an early warning system can provide is giving firefighters time to open the doors of their fire stations. This is directly correlated to LA’s experience after the Northridge quake, Rief says.

“The fire trucks in the immediate area couldn’t get out, and trucks were driving from station to station to cut other trucks out and not responding to calls.”

After a warning of an impending missile strike was erroneously issued to Hawaii residents, and alerts about wildfires and mudslides came too late to save Californians’ lives—or in some cases, were too geographically widespread to be useful—the conversation about how to reach people before disasters has changed.

Officials in Northern California, for example, chose not to send emergency messages in the middle of the night, because they were worried it might incite mass panic. During Santa Barbara mudslides, messages were sent warning people about dangerous flooding, but those messages didn’t reach all phones.

In Hawaii, it was purely human error—an employee’s mistake triggered the message that was disseminated through the emergency alert system. Although officials quickly confirmed the false alarm via Twitter, it was 40 minutes before the next official message came through to phones.

The app being developed by Early Warning Labs is more effective than those alerts—and less fallible to human error, according to its creators.

For one, the warning is a push notification that users can swipe for more information immediately, not a wireless text-only message that must be written, approved, and broadcast over the federal emergency alert system. From detection to alert delivery, the human element has been essentially eliminated. And, instead of blanketing an entire county with a generic message, the warning is customized with a countdown and shaking intensity for each user, although as the developers told PBS NewsHour, the city’s app will likely not have a countdown at first.

“We do the math on a square-mile basis,” says Rief. “If you are in LA and there’s a 4.0 [earthquake], the people who are closer to it will be getting a push alert, not getting it in Orange County.”

An April earthquake epicentered near the Channel Islands provided an effective test of the system, and allowed developers to fine-tune issues around privacy settings.

The app being developed for LA will also work as an educational tool before and after the quake to help disseminate instructions about what to do when the alert is activated.

In Mexico, where lax building codes mean earthquakes can kill thousands of people in collapsing structures, people run outside when they receive the warning. This is absolutely not what people should do in LA, where your chances of survival are better if you follow USGS’s protocol. (Which is: drop, cover, hold on.)

“It will give you a head start when an earthquake is coming—precious seconds that save lives.”

“The unique challenge with earthquake early warning is we have to teach people to fight their natural instinct to run outside or run away,” says Bashioum, who previously worked as a first responder and Community Emergency Response Team (CERT) manager.

“In the U.S. we really do have a strong and robust building code, especially on the West Coast,” he says. “A building is designed to prevent a collapse so people can survive inside.”

In the hours or days after the quake, the app can continue to send vital information about rescue efforts, emergency shelters, or evacuation routes. It can also help to keep preparedness top of mind since LA hasn’t had a big quake in recent years.

“It’s human nature to be in denial or not to think about large hazards,” says Bashioum. “Even if we know the possibility of something bad happening, we don’t prepare because it’s uncomfortable to think about it.”

But once the app is installed on people’s phones, he says, reporting the frequency of smaller quakes, it might help to put Angelenos in a different mindset—and end up saving lives.

Those who want to be the first to download the app once it’s made public can sign up here.

Correction: An earlier version of this article said that there was a greater than 99 percent chance of a Northridge-sized quake occurring in LA in the next 30 years. That figure was for the likelihood of a similar quake striking somewhere in the state.