Whether you’re a PR-setting runner or a moderate athlete, a knee injury is one of the fastest ways to sideline your sporting pursuits. The best way to make sure your knees aren’t out of commission? Preventative steps. Literally.

Take these five rules to heart when you’re injury-proofing your knees, and you’ll be keeping your whole body aligned:

running on pier

1. Rethink running

You might have heard that running is bad for your knees. That’s true for some people who have had injuries, but recent research suggests that running may not increase your risk of chronic knee problems like osteoarthritis. Just run smart: If you hit the trail, be careful on steep or uneven terrain. These conditions increase your risk of runner’s knee, a problem where your thighbone rotates too far inward, putting pressure on your kneecap. You feel dull pain under your kneecap, especially when you sit for a long time with a bent knee or take stairs.

knee resistance band

2. Strengthen your hip muscles

They control your thighbones, and the motion of your thighbones affects your knees. Try these two moves, doing 1 set of 10 reps and working up to 3 sets a day.

Move 1. Stand with one foot in the loop of a resistance band and the other foot on top of the band (adjust the length to control the resistance). Move the banded leg 2 seconds out, 2 seconds in.

Move 2. Then work another key part of your hip muscles by standing with one foot inside the band and looping the other end around the foot of a heavy piece of furniture or some other object that won’t easily move. Extend your banded leg back to 45 degrees, 2 seconds out, 2 seconds in.

woman lunges

3. Check your wheels

If your leg muscles are not balanced, you could suffer patellofemoral pain syndrome, a common cause of knee pain. The reason: a strength imbalance between two of your quadriceps muscles—the vastus medialis and the vastus lateralis—is a key contributing factor to this condition. As it turns out, the remedy is a classic exercise. Doing lunges is an ideal way to strengthen your quads equally, researchers in the U.K. recently found. That’s because lunges target the muscles on both your inner and outer thigh, while many other movements tend to work just the latter, the researchers say.

knee pain

4. Maintain knee flexibility

Sit on the floor with your legs straight. Roll up a small towel and place it under your heels just high enough for the backs of your knees to clear the ground. Flex your thigh muscles and press the backs of your knees to the floor. You should be able to touch equally well on both sides. If you can’t, do this test as an exercise: 2 sets of 15 reps (each rep is flexing your thigh for 5 seconds) four times a day until your knees match. If they don’t match after two weeks, see an orthopedist. If the test is easy but it still feels like you have cement in your knees, then see an orthopedist.

woman running hills

5. Protect your IT bands

Your iliotibial (IT) band is fibrous tissue on the outside of your thigh that stabilizes your knees and hips. If your hips and knees twist too much, the IT band rubs your lateral femoral condyle, a prominent part of your thighbone, causing pain on the outside of your knee. A long running stride increases force on your knees and IT bands. To shorten your stride, boost your step rate by 5 to 10 percent. Try to avoid landing hard on your heel, and keep your knee flexed about 20 degrees. Have a friend take video of you so you can check your form.