NUKU'ALOFA, Jan 15 (BBC) - Tsunami waves caused by a giant underwater volcanic eruption have hit the Pacific country of Tonga.

Social media footage showed water washing through a church and several homes, and witnesses said ash was falling over the capital, Nuku'alofa.

A tsunami warning sent residents scrambling to higher ground.

The eruption of the Hunga Tonga-Hunga Haʻapai volcano was heard across the South Pacific, reportedly as far as New Zealand and Australia.

Tonga's capital lies just 65km north of the volcano, on the country's main island of Tongatapu.

The plumes of gas, smoke and ash pouring from the volcano reached 20km into the sky, Tonga Geological Services said.

Locals said the eruption sounded like rumbling thunder, followed by dark skies as volcanic clouds began "raining ash and tiny pebbles".

Many parts of Tonga are experiencing a near-total blackout of power, phone lines and internet services, meaning information is scarce. But videos on social media showed large traffic jams as people tried to flee to higher ground by car.

The initial eight-minute eruption was so violent it could be heard as "loud thunder sounds" in Fiji, more than 800km (500 miles) away, according to officials in the capital, Suva. The Fijian Government has issued a tsunami advisory and opened evacuation centres for people in low-lying coastal areas.

Vanuatu, another island nation in the Pacific, issued a similar warning.

Prof Shane Cronin, a volcanologist at the University of Auckland, said the eruption was one of the biggest in Tonga in the past 30 years.

"This is a pretty big event - it's one of the more significant eruptions of the last decade at least," he told the BBC.

"The most remarkable thing about it is how rapidly and violently it's spread. This one was larger, a much wider lateral spread, much more ash was produced. I expect there to be many centimetres of ash that have been deposited on Tonga."

A spokesperson for the Australian government, said the prime minister and minister for foreign affairs are monitoring the situation and ready to provide support on request.

A tsunami warning has been issued for parts of Australia's east coast and Tasmania.

Authorities told people in the eastern state of New South Wales to "get out of the water and move away from the immediate water's edge".

In New Zealand, which is more than 2,300km away from Tonga, the National Emergency Management Agency said coastal areas on the north and east coast of the North Island could see "strong and unusual currents and unpredictable surges at the shore".

Local forecaster Weather Watch tweeted about the eruption: "The energy release is simply astonishing", adding: "Reports of people hearing the sonic booms across New Zealand."