Scientifically, it's almost a sure thing — Tokyo is awaiting a catastrophic earthquake. In fact, it's long overdue.

And when it does hit, officials say, there is one other thing that is a near certainty — hundreds of thousands of people will be in need of shelter that the government will not be able to provide. Studies show as many as 3 million will be homeless, some 600,000 more than shelters can now handle.

But with little space for new facilities, the city is hoping to cut down those numbers — and the number of deaths and injuries — by providing residents with the world's first wide-scale earthquake alert system, which became operational on Monday.

• Click here for FOXNews.com's Asia Center.

• Click here for FOXNews.com' Natural Disaster section.

• Click here to visit FOXNews.com's Natural Science Center.

The city is hoping that, with its extremely high population density and little space available to build new shelters, giving residents more information and even a slight heads up will cut down on confusion, mitigate the secondary damage caused by fires and encourage them to plan ahead for how to cope and where to go.

The new warning system uses data provided by the Meteorological Agency, which maintains an intricate network of sensors deep underground nationwide that estimate the intensity of a quake as soon as the ground ruptures.

The system works by detecting primary waves, which spread from the epicenter of a quake and travel faster than the destructive shear waves.

When primary waves of a certain intensity are detected, the alarms are set off as much as 30 seconds ahead of the shear waves.

Public broadcaster NHK will relay the warning almost instantaneously to its television and radio audience.

The alert system was launched at 9 a.m. Monday at the Japan Meteorological Agency, said Akiko Takahashi, an agency spokeswoman. Transport Ministers Tetsuzo Fuyushiba attended a ceremony at the agency, where he turned on the switch to launch the system.

The alert will be broadcast on NHK's television and radio, as well as major network TV stations in Tokyo, she said. So far there have been no troubles reported, Takahashi said.

The system is not perfect.

It can be flummoxed by lightning or other interference, and won't work for areas directly above the ruptured fault because the two waves it detects are nearly simultaneous. Residents who are not watching television or listening to the radio when an alert goes out will not hear it.

Still, the agency says the system already helped it issue a tsunami alert for a magnitude-6.9 earthquake in northern Japan in March two minutes faster than its old early warning system would have. The agency was also able to put out a warning ahead of July's magnitude-6.8 quake.

Otherwise, the city's options are limited.

"We've been aware that there could be shelter problems if the worst-case scenario comes true," said Cabinet Office Disaster Management official Natsuo Ito. "The lack of space is extreme."

Tokyo is rattled by dozens of mild to moderate tremors each year.

But every 70 years or so, the fault line under Tokyo produces a catastrophic earthquake — and the city, scientists say, is long overdue. The last big one hit Sept. 1, 1923, with a magnitude of 8.3 and killed more than 140,000 people.

In the worst-case scenario, as many as 7,800 people could die and Japan could suffer about $974 billion in economic damage, according to government estimates.

Stricter building codes since a 1995 quake flattened much of the city of Kobe, along with heightened readiness since the 1923 quake are behind the lower death estimates. But critics have also said that the estimate is low, and reflects government optimism.

According to a 2005 study, about 3 million of Tokyo's 12.5 million residents may also be forced to look for emergency shelters. But a Cabinet Office survey of the local governments that make up Tokyo completed in July found as many as 600,000 people could find themselves turned away for lack of space.

Part of the problem, Ito said, is not knowing how well the designated shelters — mostly schools and auditoriums — will hold up after a major earthquake.

"Local authorities have the responsibility for designating and maintaining the facilities to be used as emergency shelters," said Tokyo metropolitan government official Hiroyuki Akagi. "We can offer some guidance and support, but the local authorities have to take the initiative."

The number of people searching for space could also be cut to as low as 490,000 if evacuees are directed or find their way to shelters not in their neighborhood.