A one-of-its-kind early warning system provided seconds of advance notice to many residents of Tokyo shortly before a massive earthquake rocked the Japanese capital on Friday afternoon.
The system went into operation in 2007 and links more than a thousand seismographs across Japan. Each location is linked to a central computer that attempts to detect the weak but fast-moving primary waves that are generated by an earthquake and use them to triangulate the location of the quake and estimate its size.
The amount of warning provided depends on the distance from the earthquake's epicentre. Those closest to the source of the quake and susceptible to the strongest shaking get little or no warning. The warnings begin to make a difference around 50 to 100 kilometres from the epicenter of a strong quake, where up to 30 seconds warning can be provided.
That may not sound like much, but it's enough time to bring high speed trains to an emergency halt, stop factory production lines and get schoolchildren under their desks.
On Friday afternoon, the system sprung into action and a warning flashed automatically on television screens. The first waves of shaking from the quake arrived in Tokyo about 10 seconds later, said people who had televisions on at the time.
A recording of the warning as it appeared during a live broadcast from Japan's parliament, has been posted to YouTube. The warning appears at the 8-second mark, and the shaking can be seen beginning about 40 seconds later and continues to build for about 2 minutes.
The same system also extends to the cell phone network, but on Friday many phones did not sound a warning until after the shaking had stopped.
Japan is one of the most seismically active nations on earth, with about 100,000 earthquakes occurring in and around the country each year. But few come even close to the power of Friday's earthquake.
The tremblor was centered about 10 kilometres under the Pacific Ocean, and triggered a 7-metre tidal wave that obliterated several coastal communities. Several hundred people are reported dead and public broadcaster NHK said the death toll could rise to over 1,300.
Japan's Meteorological Agency measured it at magnitude 8.8, making it the largest since the country started keeping records in the 1800s. The US Geological Survey estimated its strength at magnitude 8.9.
In 1923, Tokyo was largely destroyed and up to 142,000 people were killed by a quake that was estimated at between magnitude 7.9 and 8.4. In 1995, a magnitude 7.3 quake caused widespread destruction in the western Japanese city of Kobe and killed 6,434 people.