Long before the gaokao, China ran the world's longest-lasting system of examinations: the imperial civil-service examination, or keju (科举). It began under the Sui dynasty around the start of the seventh century, grew in importance under the Tang and Song, and was abolished in 1905, in the final years of the Qing dynasty.
The keju was a ladder of exams. Candidates first passed local examinations to earn the basic degree often translated as 'licentiate' (秀才). Above that came the provincial exam, held every three years, which produced 举人, then the metropolitan exam in the capital, and finally the palace examination, nominally set by the emperor, which ranked the successful 进士. The top candidate was the zhuangyuan (状元), a title still used informally for top gaokao scorers today.
Its content was narrow by modern standards. Candidates were tested above all on the Confucian classics and their commentaries, and from the Ming dynasty onward much of the exam took the form of the rigid 'eight-legged essay' (八股文). Mathematics, science and practical administration played little part. Critics in the late Qing argued this left China's officials unprepared for the modern world, which contributed to its abolition.
Many features will look familiar to a gaokao candidate. By the Song dynasty, scripts were routinely anonymised by covering candidates' names (糊名) and recopied by clerks (誊录) so examiners could not recognise handwriting. Candidates were searched for hidden notes and sat in isolated cells for days. The Ming introduced regional quotas so that northern candidates were not swamped by the stronger southern regions — an early version of today's provincial admission quotas.
The differences are just as important. The keju selected government officials; the gaokao selects university students. The keju was closed to women and to some social groups; the gaokao is open to all who complete senior high school. And while only a tiny fraction of keju candidates ever reached the highest degree, a large majority of today's gaokao candidates go on to some form of higher education.
The cultural echo is strong all the same. The idea that a fair, written exam can lift a family's fortunes, regardless of birth, runs from the keju to the gaokao. So does the anxiety, the cramming and the public celebration of success. Understanding that history helps explain why the gaokao carries a weight that few other exams in the world do.