A eunuch (/ˈjuːnək/; Greek: εὐνοῦχος) is a man who (by the common definition of the term) may have been castrated, typically early enough in his life for this change to have major hormonal consequences. In some ancient texts, "eunuch" may refer to a man who is not castrated but who is impotent, celibate, or otherwise not inclined to marry and procreate. Most eunuchs who are castrated before puberty are asexual.
Castration was typically carried out on the soon-to-be eunuch without his consent in order that he might perform a specific social function; this was common in many societies. The earliest records for intentional castration to produce eunuchs are from the Sumerian city of Lagash in the 21st century BC. Over the millennia since, they have performed a wide variety of functions in many different cultures: courtiers or equivalent domestics, treble singers, religious specialists, soldiers, royal guards government officials and guardians of women or harem servants.
Eunuchs would probably be servants or slaves who, because of their function, had been castrated, usually in order to make them reliable servants of a royal court where physical access to the ruler could wield great influence. Seemingly lowly domestic functions—such as making the ruler's bed, bathing him, cutting his hair, carrying him in his litter, or even relaying messages—could in theory give a eunuch "the ruler's ear" and impart de facto power on the formally humble but trusted servant. Similar instances are reflected in the humble origins and etymology of many high offices (e.g., chancellor originally denoted a servant guarding the entrance to an official's study). Eunuchs supposedly did not generally have loyalties to the military, the aristocracy, nor to a family of their own (having neither offspring nor in-laws, at the very least), and were thus seen as more trustworthy and less interested in establishing a private 'dynasty'. Because their condition usually lowered their social status, they could also be easily replaced or killed without repercussion. In cultures that had both harems and eunuchs, eunuchs were sometimes used as harem servants (compare the female odalisque) or seraglio guards.