In addition, the terminal ends of the psoas major and iliacus muscles pass into the upper part of the anterior compartment from sites of origin on the posterior abdominal wall. These muscles are innervated by branches directly from the anterior rami of L1 to L3 (psoas major) or from the femoral nerve (iliacus) as it passes down the abdominal wall.