Japan’s public broadcaster on Tuesday accidentally sent news alerts that North Korea had launched a missile and that citizens should take shelter — just days after the government of Hawaii had sent a similar warning to its citizens.

The broadcaster, NHK, corrected itself five minutes later and apologized for the error on its evening news. The initial texts cited J-Alert, a system used by the government to issue warnings to its citizens about missiles, tsunamis and other natural disasters. But NHK later said that the system was not to blame for the false alarm.

Makoto Sasaki, a spokesman for NHK, apologized, saying that “staff had mistakenly operated the equipment to deliver news alerts over the internet.”

The broadcaster’s swift rectification of its error stands in contrast to the 38-minute delay by officials in Hawaii on Saturday to cancel warnings of an incoming ballistic missile. It took a further five hours for Hawaii’s governor, David Y. Ige, to apologize for the mistake.