The iliacus and psoas major muscles of the hip are so closely related in structure and function that they are often referred to as a single muscle, the iliopsoas. While each muscle has its own origin --- the iliacus arises from the ilium and the psoas major arises from the lumbar vertebrae --- both muscles merge at their midpoint to form a common insertion at the lesser trochanter of the femur.
Working together, the muscles of the iliopsoas are the most powerful flexors of the thigh at the hip joint. Flexion of the hip by the iliopsoas is an essential part of many complex motions such as walking and running. The iliopsoas of both legs can also work together to flex the trunk at the hip when other muscles hold the legs steady, as in sitting up from a supine (lying-down) position. The iliopsoas muscles also have the ability to laterally rotate the thigh at the hip. This rotation results in the leg and foot moving so that the patella, or kneecap, points away from the opposite leg.