 In 1879, it was confirmed that the sentence of castration was carried out; Yaqub Beg's son and grandsons were castrated by the Chinese court in 1879 and turned into eunuchs to work in the Imperial Palace.The eunuchs of Korea, called "Naesi" (내시, 內侍), were officials to the king and other royalty in traditional Korean society.The first recorded appearance of a Korean eunuch was in Goryeosa ("History of Goryeo"), a compilation about the Goryeo period.