The piriformis is a small, flat muscle deep in the buttock that connects your spine to your thigh bone. It sits behind the larger gluteal muscles and plays a key role in rotating your hip and stabilizing your pelvis. Most people never think about it until it causes problems, but understanding what it does and where it sits helps explain why it can be the source of significant pain when something goes wrong.
Where the Piriformis Sits
The piriformis originates from the front surface of the sacrum, the triangular bone at the base of your spine. It also attaches to the nearby sacroiliac joint capsule, the upper edge of the greater sciatic notch (a large opening in the pelvis), and sometimes a ligament connecting the sacrum to the sitting bone. From these attachment points, the muscle runs diagonally across the buttock and exits the pelvis through the greater sciatic notch.
Its tendon fuses with the tendons of several other small, deep hip rotator muscles before inserting onto the top of the greater trochanter, the bony bump you can feel on the outside of your upper thigh. This diagonal path, from the center of the pelvis outward to the thigh bone, is what gives the piriformis its leverage to rotate and stabilize the hip. Nerve branches from the lower spine (primarily the S1 and S2 nerve roots, though the range can extend from L5 to S2) supply the muscle.
What the Piriformis Does
The piriformis is classified as an external rotator, meaning it turns your thigh and knee outward, away from the center of your body. You use this action constantly: stepping sideways, pivoting on one foot, getting in and out of a car, or any movement where your pelvis rotates while one leg bears your weight. A baseball pitcher uses the piriformis during every throw.
Interestingly, the muscle’s job changes depending on hip position. When your leg is straight, the piriformis rotates your hip outward. When your hip is bent (like when you’re sitting), it instead pulls your knee away from your midline, an action called abduction. This dual function makes it important in a wide range of movements.
Beyond generating movement, the piriformis works with the other deep hip muscles to keep the ball of your thigh bone seated firmly in the hip socket. It also limits how far your leg can rotate inward, acting as a brake that protects the lower limb during motion. When you walk, the piriformis helps stabilize your pelvis so it doesn’t drop on the unsupported side with each step.
The Sciatic Nerve Connection
The reason this small muscle gets so much attention is its intimate relationship with the sciatic nerve, the largest nerve in the body. The sciatic nerve typically exits the pelvis just below the piriformis, passing directly beneath it. In roughly 93% of people, this is the arrangement: the entire sciatic nerve runs below the muscle without passing through it.
In about 7% of people, the anatomy differs. The most common variation involves part of the sciatic nerve (the common peroneal branch) piercing through the piriformis muscle itself while the other branch (the tibial nerve) passes below. Rarer arrangements exist, including cases where the piriformis has two separate muscle bellies with a nerve branch passing between them. These anatomical variations can make certain individuals more vulnerable to nerve compression.
Piriformis Syndrome: When the Muscle Causes Pain
Piriformis syndrome occurs when the piriformis muscle compresses or irritates the sciatic nerve. This can happen when the muscle becomes tight, swollen, or goes into spasm, often from overuse, prolonged sitting, or direct trauma to the buttock. The result is pain deep in the buttock that can radiate down the back of the leg, sometimes with numbness or tingling. It mimics sciatica caused by a spinal disc problem, which is part of what makes it tricky to diagnose.
The key difference from a herniated disc or spinal stenosis is location. Spinal causes of sciatica typically produce symptoms that start in the lower back and travel downward. Piriformis syndrome produces pain that originates in a more specific area of the buttock, right where the muscle crosses the sciatic nerve, without lower back involvement. The pain often worsens with sitting, climbing stairs, or activities that require hip rotation.
During a physical exam, several maneuvers can help identify the problem. The FAIR test involves bending the hip, pulling the knee toward the opposite shoulder, and rotating the lower leg outward, which stretches the piriformis and may reproduce symptoms. Other tests involve resisting hip rotation or having a patient lie on their side and hold their bent knee off the table. If these positions trigger deep buttock pain, the piriformis is a likely culprit.
Stretching and Exercise as First-Line Treatment
Stretching and strengthening exercises are the primary treatment for piriformis-related pain. The goal is straightforward: loosen the muscle so it stops irritating the sciatic nerve, then build enough strength and flexibility to prevent recurrence.
The most commonly recommended stretch is the knee-to-opposite-shoulder stretch. You lie on your back, lift the affected leg, bend the knee, and use your opposite hand to pull the knee across your body toward the opposite shoulder. Holding for 30 seconds, three times on each side, twice a day is a typical protocol. Another effective stretch is the ankle-over-knee position (sometimes called figure-four): lying on your back with both knees bent, crossing the ankle of the affected side over the opposite knee, then pulling the bottom thigh toward your chest. This targets the piriformis by putting it in a lengthened position.
Strengthening exercises for the surrounding hip muscles, particularly the other external rotators and the gluteal muscles, help take pressure off the piriformis by distributing the workload more evenly. A consistent routine of stretching and strengthening can significantly reduce symptoms for most people.
When Stretching Isn’t Enough
Initial treatment also commonly includes heat therapy, massage, and anti-inflammatory medications alongside exercise. For people who don’t improve with these conservative measures, image-guided injections are the next step. In one study of 97 patients treated with CT-guided injections to the piriformis muscle and the area around the sciatic nerve, patients who received botulinum toxin (Botox) along with the injection had a significantly better short-term response than those who received injections without it. The median pain-free period was 30 days in the Botox group compared to just 1 day without it.
Botox works by reducing excessive muscle contraction, essentially relaxing a muscle that won’t release on its own. About 43% of patients in that study had already tried injections at other clinics without success, suggesting the technique and guidance method matter. Surgery to release the piriformis muscle is reserved for cases that fail all other treatments, but this is uncommon.

