The duct descends medially on the pelvic wall, deep to the peritoneum, and crosses the ureter posterior to the bladder. It continues inferomedially along the base of the bladder, anterior to the rectum, almost to the midline, where it is joined by the duct of the seminal vesicle to form the ejaculatory duct.