It’s a good idea to warm up your muscles as part of your exercise routine. Muscles that are not properly warmed up are at higher risk of injury. This can easily be accomplished with a light, active warmup such as dynamic stretching or jogging.

While professionals disagree over whether it’s better to stretch before or after a workout, most doctors recommend stretching as part of an exercise routine, particularly if you’re doing activities such as running or biking.

Flexibility doesn’t happen overnight, however. Some people are naturally less flexible than others, so it may take weeks of regular stretching to improve joint mobility. Carol Michaels, founder of Recovery Fitness, is certified by the Cancer Exercise Training Institute, the American Council on Exercise, the American College of Sports Medicine, and is a member of ACSM and IDEA.

Here are four leg stretches she recommends to improve flexibility and reduce the risk of injury. Try to hold each stretch for about 30 seconds.

The quadriceps, or quads for short, is the muscle group in the front of your thigh. You use these muscles when you walk, run, or do lunges.

To stretch your quads:

  1. Stand with your side to the wall, placing a hand on the wall for balance.
  2. Hold your outside foot with your outside hand and lift the foot up toward your rear end, keeping your thighs and knees together.
  3. You should feel a gentle to moderate stretch in the front of the thigh.
  4. Hold for a cycle of relaxation breathing, then do the same for the other foot.

The hamstrings are the muscles along the back of your upper leg, running from the thigh to the knee. They help you to bend your knee and move your hip. These muscles are used when you’re playing sports or running.

Your calf muscles are along the back of your lower leg. They help move your heel during activities such as walking, running, or jumping.

To stretch both muscle groups together:

  1. Place your right foot in front of you.
  2. Hinge at the waist to lean your torso forward toward the extended right leg, and bend your supporting knee.
  3. Slowly flex your right ankle so that your toes are pulling up toward your body.
  4. Hold for a cycle of relaxation breathing and then repeat with the left foot.

The inner thigh muscles help to stabilize your hip and knee joints. Exercises that focus on working inner thighs are often recommended to tone and strengthen the legs.

To stretch your inner thighs:

  1. Stand with a very wide stance.
  2. Bend your right knee as you shift your entire body right until you feel a stretch in your left inner thigh.
  3. Hold for a cycle of relaxation breathing, then shift your weight to the other side and repeat with the left leg.

This stretch works your lower back, hamstring, calf, and ankle. All of these areas are used in your daily activities, and while running or biking.

To perform this stretch:

  1. Lie on your back with your knees bent and your feet flat on the floor.
  2. Bend one knee and hug it into your body.
  3. Slowly kick that leg up toward the ceiling, straightening it and pulling it toward the torso until tension is felt behind the leg.
  4. Point and flex the foot 3 times and perform 3 ankle circles in each direction.
  5. Lower the leg and repeat with the opposite leg.

All four of these stretches can help you avoid injuries if you’re a runner or if you play any sport that works your legs. Do them either before or after a workout, or any time your leg muscles are feeling tight.