A University of Texas student is suing an Austin doctor and the Medspring Urgent Care clinic accusing the doctor of misdiagnosing him with "blue balls" and ultimately causing the loss of his testicle.

The student filed a civil lawsuit in state district court in Travis County last week. According to the suit, he went to the Medspring clinic across the street from the UT campus on March 1 because of pain in his left testicle. The doctor, Dipen Patel, told him that the pain could have been caused by "blue balls" referring to the aching in the testicles brought on by prolonged sexual arousal, the lawsuit says. Patel suggested that the man masturbate and go to the hospital if the pain hadn’t gone away after 48 hours, according to the suit.

Later that night, the man went to the St. David’s Medical Center emergency room in extreme pain, according to the lawsuit, and after an ultrasound was diagnosed with testicular torsion, a condition in which blood supply is cut off to the testicle because it has rotated. If not treated within six hours, the testicle could stop functioning, according to the lawsuit.

Even after emergency surgery, the man lost his testicle, according to the lawsuit.

"This was a loss that didn’t need to occur," said the man’s attorney, Andrew Edge, of Austin. "This is an urgent care center that’s used by UT students every day. They should be able to trust the care they receive from those doctors and from that facility. Medspring and Dr. Patel failed my client."

The man has accused Patel and Medspring of negligence for not diagnosing the torsion and is suing for damages.

A call to Medspring on Tuesday for comment was not returned.