What Is a Hamstring? Anatomy, Function, and Injuries

Your hamstring is a group of three muscles running along the back of your thigh, from your pelvis down to just below your knee. These muscles work together to bend your knee and extend your hip, making them essential for walking, running, jumping, and climbing. They’re also one of the most commonly injured muscle groups in the body, particularly among athletes.

The Three Hamstring Muscles

The hamstring isn’t a single muscle. It’s a complex of three separate muscles that share the back of your thigh:

  • Biceps femoris: The outermost hamstring muscle, which has two parts called the long head and the short head. It sits on the outer side of the back of your thigh.
  • Semitendinosus: A long, thin muscle that runs along the inner portion of the back of your thigh.
  • Semimembranosus: The deepest and widest of the three, also on the inner side.

Two of these muscles, plus the long head of the biceps femoris, start from the same bony point at the base of your pelvis, a bump called the ischial tuberosity. You know it as your “sit bone,” the hard spot you feel when you sit on a firm surface. The short head of the biceps femoris is the exception. It originates from the back of the thighbone itself rather than the pelvis. All three muscles cross behind the knee and attach to bones in your lower leg via thick tendons.

What Your Hamstrings Do

The hamstrings have two primary jobs. First, they bend your knee, pulling your heel toward your buttock. You use this motion every time you take a step, pedal a bike, or climb stairs. Second, they extend your hip, pulling your thigh backward. This is the power behind pushing off the ground when you sprint or stand up from a chair.

Because the hamstrings cross both the hip joint and the knee joint, they work as a bridge between your upper and lower leg. This dual role makes them critical for coordinating movement but also puts them under significant stress, especially during explosive activities like sprinting where they’re simultaneously lengthening at the hip and contracting at the knee.

Why Hamstring Injuries Are So Common

Hamstring strains are among the most frequent injuries in sports. In men’s professional soccer, hamstring injuries now account for 24% of all injuries, and the rate is roughly ten times higher during matches than during training. The reason comes down to biomechanics: when you sprint, your hamstrings must rapidly switch from lengthening (as your leg swings forward) to contracting (as your foot strikes the ground). That transition point, where the muscle is stretched and loaded at the same time, is when tears typically happen.

You don’t need to be a professional athlete to strain a hamstring. Weekend runners, recreational soccer players, and anyone who suddenly accelerates or overstretches can experience one. People with tight hamstrings, strength imbalances between the front and back of the thigh, or a previous hamstring injury face higher risk.

Grades of Hamstring Strain

Hamstring injuries are classified into three grades based on how much tissue is damaged:

  • Grade 1 (mild): Minimal tissue disruption. You’ll feel tightness or mild pain in the back of your thigh, but you can still walk and move your leg with only slight discomfort. Strength loss is minimal or absent.
  • Grade 2 (moderate): A partial tear of the muscle fibers. This causes noticeable pain, swelling, and bruising. You’ll have difficulty using the leg normally, and the muscle will feel noticeably weaker.
  • Grade 3 (severe): A complete tear through the muscle or where the muscle meets the tendon. Pain is immediate and intense, often accompanied by a popping sensation. You may see a visible lump or gap in the muscle, and using the leg becomes extremely difficult.

What a Hamstring Injury Feels Like

The symptoms vary by severity, but the most common signs include pain in the back of your thigh (especially when moving or using the leg), stiffness, swelling, and tenderness when you press on the area. With more serious tears, bruising often appears within a day or two, sometimes extending down toward the knee or up toward the buttock as gravity pulls the pooled blood downward.

One telltale symptom is pain when sitting, particularly where the hamstring connects to your sit bone. Many people find that leaning their weight to the uninjured side relieves the pressure. With grade 2 and 3 injuries, you may hear or feel a pop at the moment of injury, followed by a sudden loss of power in the leg. Muscle spasms are also common in the hours and days after the initial strain.

How Hamstring Injuries Are Diagnosed

A physical exam can usually identify a hamstring strain. Clinicians look for altered walking patterns, tenderness at the injury site, and pain when you try to bend your knee or extend your hip against resistance. Several stretch-based tests help confirm the diagnosis. In one common test, you lie on your back while the examiner lifts your straight leg. Pain or apprehension during this movement points to a hamstring problem. Other tests involve quickly stretching the hamstring from a standing or lying position to see if it reproduces symptoms.

When pain runs down the back of the thigh but doesn’t seem to originate from the hamstring itself, additional tests can check whether the issue is actually referred pain from the lower back or irritation of nearby nerves. Imaging, typically an MRI, is used when a severe tear is suspected or when the injury isn’t improving as expected.

Recovery and What to Expect

Mild grade 1 strains often resolve within one to three weeks with rest, ice, gentle stretching, and a gradual return to activity. The muscle fibers aren’t significantly torn, so healing is relatively quick as long as you don’t push through pain too early.

Grade 2 strains take longer, typically several weeks to a couple of months. Rehabilitation focuses on progressively loading the muscle, restoring flexibility, and rebuilding strength before returning to full activity. Returning too soon is one of the biggest risk factors for re-injury, which is a persistent problem with hamstring strains.

Grade 3 tears require the longest recovery, and complete tears near the tendon attachment sometimes require surgical repair. Recovery from surgery can take several months, with a structured rehabilitation program guiding the return to sport or normal activity.

Preventing Hamstring Injuries

The single most effective exercise for reducing hamstring injury risk is the Nordic hamstring curl. In this exercise, you kneel on the ground while a partner holds your ankles, and you slowly lower your body forward using only your hamstrings to control the descent. This loads the muscle while it’s lengthening, which is the exact type of stress that causes most hamstring strains. A meta-analysis found that Nordic curl training reduces hamstring injury rates by about 50% in athletes.

Beyond Nordic curls, maintaining balanced strength between the front and back of your thighs matters. Many people develop stronger quadriceps (front of thigh) relative to their hamstrings, which creates an imbalance that increases strain risk. Regular hamstring-focused strengthening, proper warm-ups before explosive activity, and maintaining flexibility all contribute to keeping these muscles healthy. If you’ve had a previous hamstring strain, consistent strengthening is especially important, since a history of injury is one of the strongest predictors of it happening again.