Cavernous nerves

[1] They arise from cell bodies in the inferior hypogastric plexus where they receive the pre-ganglionic pelvic splanchnic nerves (S2-S4).

These nerves are susceptible to injury following prostatectomy or genital surgery.

Nerve-sparing prostatectomy was invented for surgeons to avoid injuring the nerves and causing erectile dysfunction complications.

During surgery, a doctor may apply a small electrical stimulation to the nerve and measure the erectile function with a penile plethysmograph.

[2] This test aids the surgeon in identifying the nerves, which are difficult to see.