TOKYO — In earthquake-prone Japan, people have grown accustomed to seeing regular alerts on television and their cellphones advising them to seek cover or move inland in advance of a tsunami. But on Tuesday, residents received a rare warning: A missile was approaching from North Korea and was likely to fly over parts of Japan.

Citizens living beneath the missile’s flight path received a beeping alert on their cellphones at 6:02 a.m., just four minutes after the projectile was launched, rousing some from sleep.

Image An alert sent to residents of northern Japan at 6:02 a.m. saying a North Korean missile had been launched. Credit... Thomas White/Reuters

At the same time the phone alert was sent, the public broadcaster NHK cut into its early morning newscast with a black screen warning citizens that a missile was approaching and they should take cover.