The accessory n. (or spinal accessory n.) is CN XI. The nerve originates from cervical spinal levels C1 through C6, ascends along the spinal cord, enters the cranial cavity through the foramen magnum, and then exits the cranial cavity through the jugular foramen (with CN IX and CN X). It provides motor innervation to the sternocleidomastoid and trapezius muscles.