Organ that produces sperm in male (and hermaphrodite) animals. In vertebrates it is one of a pair of oval structures that are usually internal, but in mammals (other than elephants and marine mammals), the paired testes (or testicles) descend from the body cavity during development, to hang outside the abdomen in a scrotal sac. The testes also secrete the male sex hormone androgen.