HONOLULU -- A false alarm that warned of a ballistic missile headed for Hawaii sent the islands into a panic Saturday, with people abandoning cars in a highway and preparing to flee their homes until officials said the cellphone alert was a mistake.

Hawaii officials apologized repeatedly and said the alert was sent when someone hit the wrong button during a shift change. They vowed to ensure it would never happen again.

"We made a mistake," said Hawaii Emergency Management Agency Administrator Vern Miyagi.

For nearly 40 minutes, it seemed like the world was about to end in Hawaii, an island paradise already jittery over the threat of nuclear-tipped missiles from North Korea.

The emergency alert, which was sent to cellphones statewide just before 8:10 a.m., said: "BALLISTIC MISSILE THREAT INBOUND TO HAWAII. SEEK IMMEDIATE SHELTER. THIS IS NOT A DRILL."

On the H-3, a major highway north of Honolulu, vehicles sat empty after drivers left them to run to a nearby tunnel after the alert showed up, the Honolulu Star-Advertiser reported. Workers at a golf club huddled in a kitchen fearing the worst.

Professional golfer Colt Knost, staying at Waikiki Beach during a PGA Tour event, said "everyone was panicking" in the lobby of his hotel.

"Everyone was running around like, 'What do we do?"' he said.

Cherese Carlson, in Honolulu for a class and away from her children, said she called to make sure they were inside after getting the alert.

"I thought, 'Oh my god, this is it. Something bad's about to happen and I could die,"' she said.

tweeted there was no threat about 10 minutes after the initial alert, but that didn't reach people who aren't on the social media platform. A revised alert informing of the "false alarm" didn't reach cellphones until about 40 minutes later.

The incident prompted defence agencies including the Pentagon and to issue the same statement, that they had "detected no ballistic missile threat to Hawaii."

The White House said President Donald Trump, at his private club in Florida, was briefed on the false alert. White House spokeswoman Lindsay Walters said it "was purely a state exercise."

Hawaii House Speaker Scott Saiki said the system Hawaii residents have been told to rely on failed miserably. He also took emergency management officials to task for taking 30 minutes to issue a correction, prolonging panic.

"Clearly, government agencies are not prepared and lack the capacity to deal with emergency situations," he said in a statement.

For their part, Hawaii Gov. David Ige and Miyagi, the emergency management administrator, apologized and vowed changes.

"I am sorry for the pain and confusion it caused. I, too, am extremely upset about this and am doing everything I can do to immediately improve our emergency management systems, procedures and staffing," said Hawaii Gov. David Ige.

The alert caused a tizzy across social media.

At the PGA Tour's Sony Open on Oahu, Waialae Country Club was largely empty and players were still a few hours from arriving when the alert showed up. Workers streamed into the clubhouse trying to seek cover in the locker room, which was filled with the players' golf bags, but instead went into the kitchen.

Several players took to Twitter. Justin Thomas, the PGA Tour player of the year, tweeted, "To all that just received the warning along with me this morning ... apparently it was a 'mistake'?? hell of a mistake!! Haha glad to know we'll all be safe."

In Honolulu, hair salon owner Jaime Malapit texted his clients that he was cancelling their appointments and was closing his shop for the day.

"I woke up and saw a missile warning and thought 'no way.' I thought 'No, this is not happening today,"' Malapit said.

Brian Naeole, who was visiting Honolulu from Molokai, said he wasn't worried since he didn't hear sirens and neither TV nor radio stations issued alerts.

"I thought it was either a hoax or a false alarm," he said.

Others were outraged. Hawaii U.S. Sen. Brian Schatz tweeted the false alarm was "totally inexcusable" and was caused by human error.

"There needs to be tough and quick accountability and a fixed process," he wrote.

Federal Communications Commission Chairman Ajit Pai said on social media the panel would launch an investigation.

With the threat of missiles from North Korea in people's minds, the state reintroduced the Cold War-era warning siren tests last month that drew international attention. But there were problems there, too.

Even though the state says nearly 93 per cent of the state's 386 sirens worked properly, 12 mistakenly played an ambulance siren. At the tourist mecca of Waikiki, the sirens were barely audible, prompting officials to add more sirens there and to reposition ones already in place.

------

Associated Press writers Caleb Jones and Doug Ferguson in Honolulu; Mark Thiessen in Anchorage, Alaska; Jim Anderson in Denver; Jay Reeves in Birmingham, Alabama, and Tom Strong in Washington contributed to this report.

Associated Press writers Caleb Jones and Doug Ferguson in Honolulu; Mark Thiessen in Anchorage, Alaska; Jim Anderson in Denver; Jay Reeves in Birmingham, Alabama, and Tom Strong in Washington contributed to this report.