Ilioinguinal nerve

The ilioinguinal nerve is a mixed nerve that originates from the lumbar plexus and mainly provides sensory innervation to the skin of the upper medial thigh, external genitalia and pubic region.

This nerve arises from the anterior ramus of the first lumbar nerve (L1) via the lumbar plexus, while some of its fibers originate from anterior ramus of the 12th thoracic nerve (T12).

It crosses the anterior surface of the quadratus lumborum and passes between the transversus abdominis muscle and internal abdominal oblique muscle, then enters the inguinal canal.

The ilioinguinal nerve emerges from the inguinal canal via the superficial inguinal ring and divides into terminal branches - the anterior scrotal branches in males or anterior labial branches in females. 

The terminal branches of the ilioinguinal nerve innervate the skin of the external genitals, pubic region and the upper third of the medial surface of the thigh. 

The ilioinguinal nerve also gives off muscular branches that innervate the lower parts of the lateral abdominal muscles.