Indonesia has rerouted all flights around the erupting Anak Krakatau volcano between Java and Sumatra islands, as it spewed columns of ash into the air, days after it triggered a deadly tsunami.

A crater collapse on the volcanic island at high tide on Saturday sent waves up to 5 metres high smashing into the coast on the Sunda Strait, killing more than 400 people.

“All flights are rerouted due to Krakatau volcano ash on red alert,” the government air-traffic control agency AirNav said in a release on Thursday.

Authorities raised the volcano’s alert level to the second-highest on Thursday, imposing a 5-km exclusion zone.

Indonesian rescue teams on Wednesday struggled to reach remote areas on the western coast of Java amid an "extreme weather" rain warning after a tsunami killed more than 400 people last week.