The nasociliary nerve continues forward along the medial wall of the orbit, between the superior oblique and the medial rectus muscles, giving off several branches (Fig. 8.106). These include: the long ciliary nerves, which are sensory to the eyeball but may also contain sympathetic fibers for pupillary dilation; the posterior ethmoidal nerve, which exits the orbit through the posterior ethmoidal foramen to supply posterior ethmoidal cells and the sphenoidal sinus; the infratrochlear nerve, which distributes to the medial part of the upper and lower eyelids, the lacrimal sac, and skin of the upper half of the nose; and the anterior ethmoidal nerve, which exits the orbit through the anterior ethmoidal foramen to supply the anterior cranial fossa, nasal cavity, and skin of the lower half of the nose (Fig. 8.106).