If you spend a lot of time hiking in the mountains, chances are you will eventually lose your way. It happens even to seasoned hikers.

One key to survival is planning your route — and sharing it with someone.

“It’s been a long time since I got lost,” says Tim Glover, a wilderness expert who’s spent more than 20 years hiking in the mountains of Virginia and North Carolina. “I plan ahead and really check the trail maps before I go. I always tell somebody where I’m going and when I expect to be back.”

If you don’t return on time, Glover explains, your friend or family member will know to sound the alert and trigger a rescue mission.

Knowing how to survive in the mountains for a few days can make the difference between walking out and being carried out. Here are some tips for survival, courtesy of Glover, Kaitlyn Herman, a sales associate with Black Dome Mountain Sports in Asheville, North Carolina, and backpacker.com.

Don’t panic. “The first thing to do is keep calm,” says Herman. “Panicking makes it worse.” Glover agrees, saying you shouldn’t start running or walking faster than your usual pace. “You risk falling, particularly on mountain terrain,” he says. And whatever you do, he says, "don't split up your group."

Follow the water downstream. "If you can hike, keep moving on a straight course until you reach running water," says Glover. "That's the best plan if you're not prepared for spending the night." (If you can't move because you're hurt or someone in your party is injured, he says, stay put and signal for help.)

Communities are based around water supplies, so finding a river or creek is your priority. “Even if you’re deep in a national forest, if you find moving water and follow it downstream, at some point you’re going to cross a road or hit a junction,” Glover says. If you are hiking above the tree line in the mountains, follow cairns and blazes.

Related: What to Do if You Encounter a Mountain Lion

Use your map and compass to figure out where you are. A topographic or 3-D map is the best kind to carry. On its website, Gizmodo notes a map and compass together is like having a GPS. Here's how to use them, according to that website:

  1. Look for two prominent objects you can identify on the map, like a cliff face or mountain peak.
  2. Hold your compass level and point its “direction of travel arrow” at the first object.
  3. Twist the bezel (the movable ring surrounding the compass capsule) so the red arrow inside it aligns with the needle.
  4. Find the object you're pointing at on the map and put the long edge of your compass on it, then rotate the map until its orienting lines align with those inside the compass bezel.
  5. “Trace the line created by the edge of your compass on the map; you are somewhere on it."
  6. "Repeat the process with the second object. Where the two lines cross, that's your exact position. Congratulations: You're no longer lost.”

Signal for help. If you’re injured or unable to find running water or figure out where you are, concentrate on signaling for help. Building an emergency lean-to takes time and energy, Glover says, so unless the weather turns against you, he advises sheltering in your tarp. “Don’t count on cell service as it tends to be spotty in back country,” says Glover.

He recommends blowing your whistle often (blowing three times in a row is the universal distress signal) in case there are other hikers nearby. Try signaling planes with a mirror and putting bright-colored clothes and other objects in an area where someone in a plane or helicopter can spot them (using clothes or rocks to spell "HELP" on a dirt or rock background is also a time-honored tradition). With any luck, you’ll be back home soon with a story to tell for years.

Related: SafeBee Survival Guide

Packing for survival

Smart planning and packing can help you survive if you find yourself lost in the mountains. Glover advises hiking with a buddy and making sure you’re equipped with basic survival supplies. These include a compass, map, small medical kit, whistle, flashlight, cell phone, mirror and bright colored items to attract aerial rescuers if necessary. Also bring food and water. “Even if I’m just going on a day hike, I take a water filtration system with me,” says Glover.

In addition to a compact water filtration system, purification tablets should also go into your pack, says Herman. “Bring an emergency blanket and a compact tarp to stay warm. They fold down to almost pocket size. And you really need to have the correct gear for the time of year. Pack clothes that you can wear in layers to put on or peel off as the temperature changes.”

Finally, check the weather forecast for the area you’re hiking. This will dictate what extra gear to pack.

Related: "Survivorman" Les Stroud: How to Survive Being Lost in the Wild

Steve Evans, MA, is an award-winning journalist with more than 20 years experience in daily news, investigative, health and business journalism. Among other jobs, he has served as managing editor of the Central Virginia Newspaper Group, as a senior writer for SNL Financial and as a staff writer for The Progress Index and the Richmond Times-Dispatch.