California officials are spending more than $40 million on an earthquake early warning system that in addition to alerting the public could also be used to automatically halt trains and open fire station doors moments before a major tremor actually strikes.

California Gov. Gavin Newsom announced after a magnitude 7.1 quake shook Southern California on Friday that the state has already installed 70 percent of the 1,115 early detection sensors it needs to have the system in place statewide.

"I think the whole state's on notice right now about the opportunity that's in front of us," said Ryan Arba, chief of seismic hazards under the governor's Office of Emergency Services.