An undersea volcano erupted in spectacular fashion near the Pacific nation of Tonga on Saturday, sending large tsunami waves crashing across the shore and people rushing to higher ground.

A tsunami advisory was in effect for Hawaii and the US Pacific coast.

There were no reports of injuries or the extent of the damage as communications with the country remained cut off hours after the eruption.

In Hawaii, the Pacific Tsunami Warning Centre reported waves slamming ashore, from a foot high in Nawiliwili, Kauai, to two and a half feet in Hanalei.

“We are relieved that there is no reported damage and only minor flooding throughout the islands,” the centre said.

On Tonga, video posted to social media showed large waves washing ashore in coastal areas, swirling around homes and buildings.

New Zealand’s military said it was monitoring the situation and remained on standby, ready to assist if asked.

Satellite images showed a huge eruption, a plume of ash, steam and gas rising like a mushroom above the blue Pacific waters.

The Tonga Meteorological Services said a tsunami warning was declared for all of the archipelago, and data from the Pacific tsunami centre showed waves of two and a half feet had been detected.

Residents of American Samoa were alerted to the tsunami warning by broadcasters as well as church bells that rang territory-wide.

An outdoor siren warning system was out of service. Those living along the shoreline quickly moved to higher ground.

As night fell, there were no reports of any damage and the Hawaii-based tsunami centre cancelled the alert.

Authorities in the nearby island nations of Fiji and Samoa also issued warnings, telling people to avoid the shoreline due to strong currents and dangerous waves.

The Japan Meteorological Agency said there may be a slight swelling of the water along the Japanese coasts, but it was not expected to cause any damage.

The Islands Business news site reported that a convoy of police and military troops evacuated Tonga’s King Tupou VI from his palace near the shore.

Tonga volcano eruption
An undersea volcano erupted in spectacular fashion near Tonga (Japan Meteorology Agency/AP)

He was among the many residents who headed for higher ground.

The explosion of the Hunga Tonga Hunga Ha’apai volcano was the latest in a series of spectacular eruptions.

A Twitter user identified as Dr Faka’iloatonga Taumoefolau posted video showing waves crashing ashore.

“Can literally hear the volcano eruption, sounds pretty violent,” he wrote, adding in a later post: “Raining ash and tiny pebbles, darkness blanketing the sky.”

The first waves to hit the continental United States were measured at about one foot in Nikolski, Atka and Adak, Alaska. The wave was less high at Monterey, California, the US National Tsunami Warning Centre said in a tweet.

Beaches and piers were closed across southern California as a precaution. The National Weather Service tweeted there were “no significant concerns about inundation”.

Strong rip currents were possible, however, and officials warned people to stay out of the water.

On California’s central coast, the National Weather Service reported tsunami waves up to 4ft and flooding in beach car parks at Port San Luis.

About 200 miles down the coast the waves were much smaller at southern California’s Seal Beach, according to Michael Pless, the owner of M&M Surf School.

“The waves are looking pretty flat,” Mr Pless said. “We’re hoping they reopen the beach in a couple hours.”

Crowds gathered at the Santa Cruz Harbour in California to watch the rising and falling water strain boat ties on docks. Law enforcement tried to clear people away when big surges began.

About an hour later, a surge went over the back lip of the harbour, filling a car park and low-lying streets and setting some cars afloat.

Although experienced surfers would consider the waves reaching the west coast barely high enough to qualify as swells, the National Weather Service warned that tsunamis cause deceptive water surges powerful enough to pull people out to sea.

Earlier, the Matangi Tonga news site reported that scientists observed massive explosions, thunder and lightning near the volcano after it started erupting early Friday.

Satellite images showed a three-mile plume rising into the air to about 12 miles.

More than 1,400 miles away in New Zealand, officials were warning of storm surges from the eruption.

The National Emergency Management Agency said some parts of New Zealand could expect “strong and unusual currents and unpredictable surges at the shore following a large volcanic eruption”.

The volcano is located about 40 miles north of the capital, Nuku’alofa.

In late 2014 and early 2015, a series of eruptions in the area created a small new island and disrupted international air travel to the Pacific archipelago for several days.

Tonga is home to about 105,000 people.