A eunuch is a castrated man, in particular one castrated early enough to have major hormonal consequences; the term usually refers to those castrated in order to perform a specific social function, as was common in many societies of the past. The earliest records for intentional castration to produce eunuchs are from the Sumerian city of Lagash in the twenty first century BC. Over the millennia since, they have performed a wide variety of functions in many different cultures such as: courtiers or equivalent domestics, treble singers, religious specialists, government officials, military commanders, and guardians of women or harem servants. In some translations of ancient texts, individuals identified as eunuchs sometimes historically included men who were impotent with women, as well as those who were celibate.