Japan has one. So do Mexico, Taiwan, Turkey and Romania.

But California has struggled to develop and deploy an earthquake warning system that would give cities seconds of crucial time to prepare for the impact of a massive earthquake.

California is spending only a fraction of what Japan and Mexico have devoted, and scientists said the progress is so slow that they cannot say when the state might complete its own system.

Until recently, researchers were spending only about $400,000 a year developing the technology. Last year, they received a $6-million grant for work on a new prototype. But experts said it would cost about $150 million to build and $5 million a year to operate a system covering California and other quake-prone states along the Pacific.

Japan’s system cost $1 billion to build and includes 1,000 GPS sensors to detect and monitor seismic waves.

One reason for the lack of interest, some experts say, is that unlike Mexico, Japan and the other countries with early warning systems, California has not experienced a truly catastrophic earthquake in more than a century.

“I think it’ll happen. The question is whether we get it sooner than before we have a tragic earthquake or whether we have it after a tragic earthquake,” said Thomas Heaton, a professor of engineering seismology at Caltech. “Unfortunately in the earthquake business, often things don’t happen until we have a tragedy.”

Officials in California have been working on a system for about five years. And as personal technology continues to evolve, their current warning plan is geared heavily toward social media and mobile communications.

Alerts of coming quake waves in California could be sent via Twitter and other forms of social media, with scientists hoping to get word out as broadly as possible. Alerts would also go up on TV and radio. With the warning, scientists hope that emergency crews would have time to open fire station doors, protect nuclear power plants, slow down trains and take other measures before the quake was felt.

Researchers have also launched a campaign for the public to attach accelerometers to home computers and smartphones that could transmit earthquake shaking to authorities in real time. They believe that this data, combined with information gleaned from underground sensors placed throughout the region, could help with the early warning system.

Waves from a quake move quickly through the ground, but electronic signals are far faster, allowing a warning to outrun the shaking.

Officials said the length of the warning depends on the quake’s epicenter. A temblor along the San Andreas fault around the Salton Sea, for example, could give up to a full minute of warning time before shaking occurred in Los Angeles, officials said.

When Japan was rocked by a 9.0 earthquake last year, the warning system sent an alert to Tokyo before the seismic waves of the quake reached the city. The same thing happened in Mexico City on Tuesday after a 7.4 quake occurred near Acapulco.

Both systems are far from perfect. Both underestimated the size of their respective quakes, and in Mexico City warnings were not as widely distributed as they should have been.

Experts warn that Los Angeles presents special challenges for an early warning system that are less of a problem in Tokyo or Mexico City.

The systems in Japan and Mexico often detect seismic waves coming from quakes that erupt off the coast at some distance. Mexico City is actually more than a hundred miles from where these earthquakes spawn, said Caltech seismologist Pablo Ampuero, who is working on California’s early warning efforts.

“They are worried about those earthquakes because the soil of Mexico City is soft as to amplify the shaking. It behaves like jelly when an earthquake reaches it,” Ampuero said. “Even if an earthquake happens on a far coast, if it reaches Mexico City, it can cause severe damage.”

By contrast, Southern California is crisscrossed by active fault lines such as Newport-Inglewood, Hollywood, Puente Hills and Whittier.

A major quake on those faults could be felt in L.A. almost immediately. By contrast, a quake on the San Andreas fault, which experts have long predicted would produce “The Big One,” could provide more time.

“If an earthquake happens here, you don’t have that much time to detect it and generate an alarm,” Ampuero said. “That’s why it’s more challenging to have an efficient warning system here. Nevertheless, we have been working on this for several years and the technology is now reaching a maturing stage to make it feasible for an early warning system in California.”

Despite these concerns, experts are convinced a system could save lives. Heaton of Caltech said that with adequate funding, a system could be working within three years. But it would probably require a public-private partnership, with utilities and other companies working to ensure the alerts get out quickly.

Mexico City’s early warning system, which leans heavily on sirens to get the word out, is bare-bones compared to Japan’s or what California researchers envision.

John Vidale of the University of Washington said early warning systems in Japan, Mexico, Taiwan and Romania all function under the same technological principle, detecting preliminary P waves that travel on the surface before the stronger S waves arrive. Japan uses particularly expensive GPS devices that are dropped into boreholes hundreds of feet below the surface.

The American model would be less expensive in part because it would not require the boreholes, Vidale said.

Still, Vidale said, “we are going to have to show that the costs of the system are outweighed by the benefits.”

hector.becerra@latimes.com

sam.allen@latimes.com

Cecilia Sanchez of The Times’ Mexico City bureau contributed to this report.