The major somatic nerve of the perineum is the pudendal nerve. This nerve originates from the sacral plexus and carries fibers from spinal cord levels S2 to S4. It leaves the pelvic cavity through the greater sciatic foramen inferior to the piriformis muscle, passes around the sacrospinous ligament, and then enters the anal triangle of the perineum by passing medially through the lesser sciatic foramen. As it enters and courses through the perineum, it travels along the lateral wall of the ischio-anal fossa in the pudendal canal, which is a tubular compartment formed in the fascia that covers the obturator internus muscle. This pudendal canal also contains the internal pudendal artery and accompanying veins.