The presence of eunuchs in the Forbidden City, the ancient home to many Chinese emperors, was a long-standing tradition.
These emasculated men served as palace menials, spies and harem watchdogs. An army of eunuchs was attached to the court, primarily to safeguard the imperial ladiesâ€™ chastity.
Confucian values deemed it vital for the emperor, seen as heavenâ€™s representative on Earth, to produce a direct male heir to maintain harmony between heaven and Earth.
Not wanting to leave anything to chance during a period with a high infant mortality rate, the worldâ€™s largest harem was placed at the emperorâ€™s disposal to ensure enough heirs would survive into adulthood.
Court chronicles record Chinese kings keeping emasculated servants in the eighth century BC, but historians generally date the appearance of eunuchs in court to the reign of Han Huan Di (AD146-167).
The government role occupied by eunuchs meant that over time they were able to exert enough influence on emperors to gain control of state affairs and even cause the fall of some dynasties.
The power of the eunuchs endured partly due to the ambitions of the consort families and partly as a result of the secluded lifestyle which etiquette prescribed for the emperor.
The eunuch system came to an end when it was abolished on November 5, 1924, when the last emperor, Puyi was driven out of the Forbidden City, where he had been living since the 1912 revolution.
Coercion: About an eighth of those who became eunuchs were young children bowing to parental pressure. Families would receive a cash reward for donating their sons, but they also hoped their children would have a more comfortable and prosperous life in the palace.
Poverty: Some adults, with no economic means to lead an honest and acceptable way of life, preferred emasculation to a life of begging and stealing.
Free choice: Some men, who could only envision a life of futility and hardship, were envious of the seemingly easy lifestyle enjoyed by palace eunuchs.
Punishment: Emperor Guangwu of Han (who reigned between 25 and 57BC) commuted all death sentences to emasculation. Successive emperors followed this edict.
The How-It-Was-Done comes here.