The scholar-gentry were the class that ran imperial China. They emerged under the Song Dynasty, when the expansion of the Civil Service Examination System displaced the old aristocracy of great clans, which had been shattered in the wars that ended the Tang. Status now came from education. A man who passed even the lowest examination gained a degree, and with it privileges set by law: exemption from labor service and corporal punishment, distinctive dress, and the right to deal with officials as a social equal.
Only a small fraction of degree holders ever served in the Chinese Imperial Bureaucracy. The rest lived in their home districts on income from rented farmland, teaching or, increasingly, commerce. There they performed, unpaid, much of the work of government that a thinly staffed state could not: mediating disputes, organizing famine relief, repairing dikes and bridges, founding schools, and compiling local histories. County magistrates, who were outsiders by rule, could not govern without them. The gentry thus linked the court to the village.
Their outlook was shaped by Confucianism and, after the Song, by the Neo-Confucianism of Zhu Xi. They cultivated poetry, calligraphy and painting, organized their kin into lineages with ancestral halls, upheld Filial Piety, and secluded their women; Foot Binding spread first among their households. They ranked themselves above farmers, artisans and merchants, though wealthy merchants routinely bought land and educated sons to join them.
Because degrees could not be inherited, each generation had to earn its place, and families rose and fell. Still, the cost of schooling meant that the class largely reproduced itself. It proved remarkably durable. The Mongol Yuan Dynasty ignored it, to its cost; the Ming Dynasty restored it; and after the Ming–Qing Transition the Manchus won its cooperation by keeping the examinations, creating a new composite elite. Its end came when the examinations were abolished in 1905 and the old order was swept away by the Chinese Revolution of 1911 and, finally, Communist land reform.
Compare the gentry with the European Nobility, whose rank came from birth and military service, and with the Samurai of Japan.