The anterior scrotal nerves are branches of the ilioinguinal nerve. The nerves innervates the scrotum in males.