People in Hawaii were alarmed Saturday by an alert on their mobile phones that said a ballistic missile was putting that American state in imminent danger, a warning that turned out to be totally untrue.

According to Sen. Brian Schatz, it was human error committed by an employee at Hawaii's weather service.

From the time the emergency was announced until the mistake was corrected took almost 40 minutes, as demonstrated by the images published by inhabitants of the islands that show the time of the alert and its later correction.

Democratic Rep. Tulsi Gabbard said on her Twitter account that "there is no incoming missile," something she said was confirmed by the Hawaiian state government.

While that was going on, US President Donald Trump was playing golf at his Mar-a-Lago residence in Florida, where he spent last weekend.

"The people of Hawaii just got a taste of the stark reality of what we face here with a potential nuclear strike on Hawaii," Gabbard said on the CNN channel during a later interview.

"I was sitting in the bathtub with my children, saying our prayers," said state lawmaker Matt LoPresti, adding that the whole situation made him very angry.

The spokesman for the US Pacific Command, Commander David Benham, said in a statement that "there is no missile threat or danger to the State of Hawaii," and that the "earlier message was sent in error."

The false alarm came amid tensions between the United States and North Korea because of the constant ballistic missile tests and development of its nuclear program being pursued by Pyongyang.