Ilioinguinal nerve

It emerges from the lateral border of the psoas major just inferior to the iliohypogastric, and passes obliquely across the quadratus lumborum and iliacus.

The ilioinguinal nerve then perforates the transversus abdominis near the anterior part of the iliac crest, and communicates with the iliohypogastric nerve between the transversus and the internal oblique muscle.

It then pierces the internal oblique muscle, distributing filaments to it, and then accompanies the spermatic cord (in males) or the round ligament of uterus (in females) through the superficial inguinal ring.

Its fibres are then distributed to the skin of the upper and medial part of the thigh, and to the following locations in the male and female: The ilioinguinal nerve does not pass through the deep inguinal ring, and thus only travels through part of the inguinal canal.

[1] This article incorporates text in the public domain from page 952 of the 20th edition of Gray's Anatomy (1918)