Scientists say they have developed a way of accurately predicting where volcanoes will erupt.

The study, published in Science Advances, could represent a major advance which could save thousands of lives from a devastating volcanic explosion.

At the moment it's unclear where exactly the magma will surge to the surface to create an eruptive vent.

Often it will be released at vents far away from previous ones, making forecasting difficult and endangering populated areas.

"It is a big challenge for volcanologists to guess where magma is heading and where it will breach the surface," the researchers said in a statement.

"A lot of effort is spent on this task as it could help minimise the risk for villages and cities endangered by eruptions."

But a new forecasting model combines magma physics with statistical analysis to understand the magma's most likely path.

"Previous methods were based on the statistics of the locations of past eruptions," says team leader Eleonora Rivalta.

"Our method combines physics and statistics: we calculate the paths of least resistance for ascending magma and tune the model based on statistics."

The researchers successfully tested the new method with data from the Campi Flegrei caldera in Italy, one of the Earth's highest-risk volcanoes.

"We will now perform more tests. If our method works well on other volcanoes too, it may help planning land usage in volcanic areas and forecasting the location of future eruptions with a higher certainty than previously possible," Rivalta explains.

Newshub.