Testicular torsion is most common between ages 12 and 18, but it can occur at any age, even before birth. Testicular torsion is an emergency condition. It happens when the spermatic cord, which provides blood flow to the testicle, rotates and becomes twisted. The twisting cuts off the testicle's blood supply and causes sudden pain and swelling.