When Mateo Mercur went for a trail run with a friend near Boulder on March 26, it felt like a typical spring weekend day. The 48-year-old psychotherapist and triathlon coach planned to head up his favorite route in Fern Canyon, over Bear Peak, and down through Shadow Canyon. It was not long after the two runners began the trek, however, that Mercur’s phone lit up—it was a text from his girlfriend alerting him to the fact that she could see a large plume of smoke near where he and his friend were recreating. “I don’t normally look at my phone on runs,” he says, “but my partner was out on a long bike ride, and I wanted to make sure she was OK.”

But it was Mercur who was in danger as the NCAR fire, which would eventually grow to 190 acres, broke out below him and his friend. “We had to hustle, but at the same time consider what our best options were,” Mercur says. “Go back the way we came? Go down Shadow Canyon as planned?” Ultimately, the two runners chose to descend through Shadow Canyon, knowing it was a fast way down and that the path they’d just ascended still had snow, which would’ve slowed their pace. Mercur also started to see the smoke himself and could sense that it was closer to the route they had just run up. The pair’s plan worked, and they ultimately made it back to the trailhead safely.

Situations like the one Mercur and his friend were in, with a wildfire encroaching on a trail where people are recreating, are likely to become more frequent in Colorado. While wildfire season used to be a four-month event, it has become 78 days longer than it was in the 1970s. Forecasts for this coming summer also predict extreme drought conditions through July, which prompted the Colorado Division of Fire Prevention and Control to warn that 2022 could be the worst wildfire year in state history. The state announced last month that it would allocate an additional $20 million in funding for firefighting and prevention.

Mercur was lucky that his familiarity with the trails near the Flatirons helped him assess how to proceed, even in a moment of urgency. Not everyone has such intimate knowledge of the terrain they’re exploring. Experts suggest that, in this era of increasingly more frequent and devastating wildfires, you’ll need a plan before you head out into the wilderness.

“There’s a lot you can do to stay safe,” says Mary Mitsos, president and CEO of the National Forest Foundation. “First and foremost, be aware of the current situation in the area where you intend to recreate.”

That means checking conditions with your local or national weather service. If there’s a red flag warning—which means warm temperatures, low humidity, and high winds, all of which increase the likelihood of fire—you might want to avoid going out on unfamiliar backcountry trails or alter your plans. “Maybe recreate closer to home or change your plan to go to the top of a peak,” Mitsos says. “You don’t know what could happen, and it’s tough for rescue to pull you out if a fire blows up big and fast.”

Wesley Trimble, communications and creative director at the American Hiking Society, recommends carrying the organization’s 10 essentials, many of which, like a compass and map, can help you navigate a precarious situation. “Evaluate in advance alternate routes if you need to exit a trail quickly,” he says. “This will help prevent getting stuck with a fire between you and a trailhead.”

Also, pay attention to your surroundings. It’s helpful to note nearby streams or lakes that can serve as potential shelter if you’re stuck and to be conscious of conditions as you proceed on trails. In Mercur’s case, the plume of smoke from the nearby NCAR fire wasn’t immediately noticeable. But once it was, he was able to assess its proximity and direction in real time. “Toward the bottom, we found a trail we knew was heading away from the fire and followed it,” he says. “We communicated that to others we passed on the way down.”

Mitsos also recommends that you bring a charged phone, along with a number for the local U.S. Forest Service office. “If you see or smell fire, let them know immediately, even if you don’t know its origin site,” she says. “If you get caught out there, call 911.”

Finally, as hard as it might be, attempt to stay calm should you find yourself in a difficult situation. Mercur depended on his former training as a lifeguard to help stay levelheaded as he exited the canyon. “I know to have a contingency plan in any outdoor situation,” he says. “I assessed as we went and knew what the trails looked like around me. The situation could have been terrible, but everyone was calm and orderly, and got out safely.”

(Read more: How to Build an Emergency Go Bag