At first, walking and hiking may sound like two words for the same form of exercise. The footwear and scenery may vary, but the lower-body mechanics seem the same.

Surprisingly, though, they’re radically different. Research shows that your joints, heart and muscles perform in distinct ways during a hike compared to what they do during a jaunt around the block.

“When you walk on a level surface, your body does a really good job of what’s known as passive dynamics,” says Daniel Ferris, a professor of engineering and biomechanics at the University of Florida. Your walking stride, he says, is like the swing of a pendulum. “Thanks to gravitational and kinetic energy, if I start that pendulum swinging, it’s going to keep moving back and forth for a long time without any additional energy input,” he says.

Like a pendulum, walking on flat terrain allows you to keep moving with little effort. “But when you walk on uneven terrain”—the type you’d encounter on nature trails, deep-sand beaches or other natural surfaces—“that knocks out a lot of that energy transfer,” Ferris says. “Your heart rate and metabolic rate go up, and you burn more calories.”

Get our Health Newsletter. Sign up to receive the latest health and science news, plus answers to wellness questions and expert tips. Please enter a valid email address. Sign Up Now Check the box if you do not wish to receive promotional offers via email from TIME. You can unsubscribe at any time. By signing up you are agreeing to our Terms of Use and Privacy Policy . This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply. Thank you! For your security, we've sent a confirmation email to the address you entered. Click the link to confirm your subscription and begin receiving our newsletters. If you don't get the confirmation within 10 minutes, please check your spam folder.

In fact, hiking on uneven terrain increases the amount of energy your body uses by 28% compared to walking on flat ground, Ferris found in a study he conducted at the University of Michigan. The varying ground slopes you encounter while hiking also make it different from flat-ground walking. Paths that go up, down and sideways require subtle shifts in the way your leg muscles lengthen or shorten while performing work, and those shifts increase the amount of energy you’re expending during your trek.

But the benefits of hiking extend well beyond the extra calorie burn.

Navigating uneven ground—whether you’re hiking or trail-running—recruits different muscles than you would use on flat, man-made surfaces. “You’re turning on and strengthening a lot of muscles in your hips and knees and ankles that you don’t normally use,” Ferris says.

MORE: How Camping Helps You Sleep Better

Pumping up those oft-neglected muscles may improve your balance and stability, which helps protect you from falls. Using those muscles may also knock down your risk for the kinds of overuse injuries—like knee or hip pains, or band issues—that can result from the repetitive nature of level-ground walking or running.

Of course, hiking isn’t without its own risks. If you’re not careful (and sure-footed), missteps can lead to rolled ankles, sprained knees, or even tumbles. Just as a novice runner or weightlifter is asking for trouble by kicking off a new routine with an extended, arduous workout, Ferris says inexperienced hikers may be more likely to injure themselves if they tackle a long, rocky hike right off the bat. You need to give those little-used leg muscles time to build up strength.

While variable terrain works your body into shape, the sights, sounds and smells of nature may be performing a similar kind of alchemy in your brain. A 2015 study from Stanford University found that time spent in natural environments (as opposed to busy city settings) calmed activity in a part of the brain that research has linked to mental illness. Hanging out with Mother Nature also seems to reduce your mind’s propensity to “ruminate”—a word psychologists use for negative, self-focused patterns of thought that are linked with anxiety and depression. “I’d say there’s mounting evidence that, for urbanites and suburbanites, nature experience increases positive mood and decreases negative mood,” says Greg Bratman, a Stanford research fellow and coauthor of that study.

More research is needed to back up these benefits. But, Bratman adds, “the idea that nature helps our mental state goes back hundreds if not thousands of years.”

For both your mind and body, a walk in the woods may be tough to beat.

Contact us at letters@time.com.