Despite what every corny '70s adventure flick may have led you to believe, you’re unlikely to run into quicksand in your day-to-day life. However, quicksand is still somewhat common near rivers, estuaries, and marshes, so it’s worth knowing how to get out. If you’re hiking alone and get that sinking feeling, don’t panic. Unless the tide rolls in while you’re stuck, you should be able to escape to safety.

1) Calm Down!

Forget what you’ve seen in movies - you’re not going to be sucked into a bottomless pit. Even in the deepest quicksand, you won’t sink far past your midsection. The human body is just too buoyant. So take deep breaths. The more air you have in your lungs, the better you’ll float like a human cork.

2) Toss Your Gear

All that extra weight will make you sink faster. Ditch your backpack and try wriggling out of your shoes. They will make escaping more difficult (boots in particular become stubborn suction cups when in mud).

3) Don’t Move

Resist the urge to wiggle your legs. Quicksand is what’s known as a non-Newtonian fluid, so it liquefies whenever there’s movement. As you sink, your weight pushes water from the sand. With the water gone, the sand thickens, creating a vacuum that tugs you down.

4) Okay, Now Move

You’re sinking because the sand around your legs has lost water. But if that water can return, the sand’s grip should loosen. That’s your route to escape—and the only way to do that is to move.

5) Put Your Back Into It

Time to redistribute your weight. If you’re ankle or knee deep, slowly sit down. If you’re waist deep, lean on your back. Don’t panic about sinking—a pit of quicksand is like a swimming pool. You’ll sink if you stand, but you’ll float if you spread out on your back.

6) Time to Shake a Leg

With your upper body now serving as a counterweight, you can start pulling your legs out. Wiggle one leg in small circles and pull. Water will slowly flood the sand around you, weakening the quicksand.

7) Perfect Your Forward Crawl

Removing your leg in one fell swoop would require as much force as it does to lift a mid-sized car, so take your time. It may take a while to remove your leg, but you’ll get it out eventually. Once both limbs are free, gently flip onto your belly and crawl to solid safety.