Auriculotemporal nerve

The auriculotemporal nerve is a sensory branch of the mandibular nerve (CN V3) that runs with the superficial temporal artery and vein, and provides sensory innervation to parts of the external ear, scalp, and temporomandibular joint. The nerve also conveys post-ganglionic parasympathetic fibres from the otic ganglion to the parotid gland.

Origin
The auriculotemporal nerve arises from the posterior division of  the mandibular nerve (CN V3) (which is itself a branch of the trigeminal nerve (CN V)). It arises by two roots  that circle around either side of the middle meningeal artery   before uniting to form a single nerve.

Course
Roots of the auriculotemporal nerve circle around both sides of the middle meningeal artery before uniting to form a single nerve. The nerve passes deep to the neck of the mandible - between it and the sphenomandibular ligament  - andthen courses deep to the lateral pterygoid muscle. It issues parotid branches and then turns superiorly, posterior to its head and moving anteriorly, gives off anterior branches to the auricle. It then crosses over the root of the zygomatic process of the temporal bone, deep to the superficial temporal artery. Shortly after the secretomotor parasympathetic fibers branch from the auriculotemporal nerve (parotid branches) to innervate the parotid gland, the auriculotemporal nerve comprises exclusively somatosensory fibers. It ascends to reach the superficial temporal region and innervate its target structures.

The auriculotemporal nerve communicates with the facial nerve (CN VII).

Parasympathetic component
Post-ganglionic parasympathetic secretomotor nerve fibres from the otic ganglion join and "hitch-hike" along the auriculotemporal nerve, leaving the nerve as it passes across the anteromedial surface of the parotid gland to enter and innervate said gland. 

Distribution
The auriculotemporal nerve provides sensory innervation to the auricle, external acoustic meatus, outer side of the tympanic membrane and the skin in the temporal region (superficial temporal branches). It also carries a few articular branches that innervate the temporomandibular joint.

Clinical significance
This nerve, as it courses posteriorly to the condylar head, is frequently injured in temporomandibular joint (TMJ) surgery, causing an ipsilateral paresthesia of the auricle and skin surrounding the ear. It is the main nerve that supplies the TMJ, along with branches of the masseteric nerve and the deep temporal.

After a parotidectomy, the nerves from the Auriculotemporal Nerve that previously innervated the parotid gland can reattach to the sweat glands in the same region. The result is sweating along the cheek with the consumption of foods (Frey's syndrome). Treatment involves the application of an antiperspirant or glycopyrrolate to the cheek, Jacobsen's neurectomy along the middle ear promontory, and lifting of the skin flap with the placement of a tissue barrier (harvested or cadaveric) to interrupt the misguided innervation of the sweat glands.

Pain from parotitis, a condition that can be caused by mumps, will be carried by the auriculotemporal nerve and great auricular nerve to the brain.