A senior official in imperial China. From the Song dynasty (960 ad), officials were recruited predominantly by examination in the Confucian classics. (Since the Han dynasty (206 bc) examinations had been used within the civil service.) There were nine grades of mandarin.