Lava streams down from Anak Krakatau (Child of Krakatoa) volcano
TOPSHOT - Lava streams down from Anak Krakatau (Child of Krakatoa) volcano during an eruption as seen from Rakata island in South Lampung on July 19, 2018. - An Indonesian volcano known as the 'child' of the legendary Krakatoa erupted on July 19, spewing a plume of ash high into the sky as molten lava streamed down from its summit. Anak Krakatau -- a small volcanic island that emerged from the ocean a half century after Krakatoa's deadly 1883 eruption -- has rumbled back to life in recent weeks, spitting flaming rocks and ash from its crater. (Photo by FERDI AWED / AFP)FERDI AWED/AFP/Getty Images [Representational Image]

Coastal residents near Indonesia's Anak Krakatau volcano have been warned to keep away from beaches amid fears it could trigger a new tsunami.

On Saturday, giant waves crashed into coastal towns on the islands of Sumatra and Java, killing at least 222 people and injuring 843.

It is thought that volcanic activity set off undersea landslides which in turn generated the killer waves. Anak Krakatau was erupting again on Sunday, spewing ash and smoke, the BBC reported.

Video shot from a charter plane captured the magnitude of the event in the Sunda Strait, between Sumatra and Java.

President Joko Widodo has expressed his sorrow for the victims and urged people to be patient.

Rescue efforts are being hampered by blocked roads but heavy lifting equipment is being transported to badly hit areas to help search for victims.

The head of the National Disaster Management Agency, Sutopo Purwo Nugroho, held a news conference on Java.

"Recommendations from [the] Meteorology, Climatology and Geophysical Agency are that people should not carry out activities on the beach and stay away from the coast for a while," he said.

"The potential for a fresh tsunami is still possible because the volcanic eruption of Anak Krakatau continues to occur, potentially triggering tsunami."

Anak Krakatau, which formed in 1927 after the Krakatoa volcano eruption, has seen increased activity in recent months with people asked to avoid the area around its crater.

On Friday, it erupted for two minutes and 12 seconds, creating an ash cloud that rose 400 metres above the mountain.

It struck at during a holiday, with few of the warning signals that might have come had it been generated by an earthquake.

Seawater did not recede as in an earthquake tsunami and experts say that even if there had been warning buoys near the volcano, there would have been minimal alert time.

However, officials say a warning siren did go off in some areas.

The waves destroyed hundreds of buildings, sweeping away cars and uprooting trees in several popular tourist destinations including the Tanjung Lesung beach resort, west Java.

Footage shared on social media showed a large wave crashing into a tent in the resort, in which popular Indonesian rock band Seventeen was performing.

Members of the band were seen being swept away as the wave destroyed the stage.

Officials say more than 160 people were killed in Java's Pandeglang tourist district. On Sumatra, 48 were reported dead in South Lampung, and deaths were also reported in Serang district and Tanggamus.

So far, no foreign nationals have been reported dead, officials say.

Indonesia is prone to tsunamis because it lies on the Ring of Fire - the line of frequent earthquakes and volcanic eruptions that circles virtually the entire Pacific rim.

In September, more than 2,000 people died when a powerful earthquake struck just off the central Indonesian island of Sulawesi, setting off a tsunami that engulfed the coastal city of Palu.

On December 26, 2004, a series of huge waves triggered by a powerful earthquake in the Indian Ocean killed about 228,000 people in 13 countries, mostly in Indonesia.

However, tsunamis caused by volcanic activity like this are less frequent.