The vas deferens is a duct of the male reproductive system that connects the testes to the urethra. It runs from the end of the epididymis toward the prostate, where it joins with the seminal vesicle to form the ejaculatory duct. The vas deferens functions in the transport of mature spermatozoa and secretes a fluid that is a component of semen.