You’d guess that knowing how to outrun an active volcano is just about as useful as knowing how to climb out of quicksand. Which is to say, not very, as you are unlikely to encounter these disaster scenarios in your lifetime. But according to a space observation agency, there are 1500 active volcanoes on Earth and more than 500 million people live dangerously close to them. While those numbers can sound scary, only 50 or so volcanoes erupt each year, discharging steam, gas, lava, or clouds of debris into the atmosphere. Here’s how to escape them.

HEED EVACUATION WARNINGS.

If you want to get away from a potentially dangerous volcano, avoid ones that are on the verge of erupting in the first place. International scientists use satellites to observe large volcanoes from above and radar and optical instruments on the ground to help predict eruptions. If measurements lead them to suspect an eruption is imminent, the local governments around the volcano will issue evacuation warnings for anyone living near the volcano’s crater, or exclusion zone. If you live near one, have a “go-bag” ready and packed with living and medical essentials in case you need to evacuate quickly. Memorize your escape route to safe ground.

Other countries may also issue travel warnings, cautioning visitors that they could be entering a risky area and may become stranded if an eruption takes place. This is what happened after the eruptions at Eyjafjallajökull in Iceland in 2010; flights to and from Europe were grounded for nearly a week. If you are visiting an active volcano, hire an experienced and knowledgeable guide who can instruct you of safety precautions, such as wearing tough boots and staying on marked trails, and warn you of any sudden environmental changes.

USE A VEHICLE TO ESCAPE AS FAST AS POSSIBLE.

Volcanic eruptions are dangerous, potentially cataclysmic events that you should never realistically expect to outrun. But you could potentially escape. According to a study on an ancient super-eruption—which produced hazardous expulsions of material—the flows typically traveled 10 mph to 45 mph for 100 miles. Humans can run only at about 15 mph, so your best bet is hopping in a vehicle, which can travel must faster. If you are escaping a lava flow, do not drive or jump over it, as it will melt your vehicle and potentially trap you between multiple streams. However, slow flows are not always the case. Flows following the 1980 Mount St. Helen’s eruption in Washington State traveled at 370 mph, which is a speed that could not be outrun.

GET UP HIGH OR UPWIND.

While lava is the most spectacular effect of eruptions, this fiery material moves so slowly that you could probably walk away from it. The truly dangerous element is the pyroclastic flow, which can reach temperatures of 1200°F and speeds of 300 mph, carrying deadly gas and ash in its cloud of destruction. Some volcanologists suggest, in a can’t-get-a-boat-off-the-island scenario, getting upwind or to high ground—such as up a surrounding mountain—to escape the low-density clouds, which tend to drop to Earth quickly and spread out rapidly over land and sea. If you have to go outside, wear safety goggles and a breathing mask and avoid any surrounding areas with dead vegetation, which is a sign the poison has already reached that area. Eruptions can also cause secondary disasters, such as mudslides or tsunamis, which compound the risks.

Your safest course of action for escaping an active volcano is to stay aware of the potential dangers and take all evacuation warnings seriously. And for the record, climbing out of quicksand is a good skill to know, too.