The Han Dynasty established the world's first formal system for selecting government officials based on merit rather than birthright. This was the precursor to the Imperial Examination system. Influenced by Confucian philosophy, Emperor Wu required local officials to recommend 'learned and virtuous' candidates to the capital for testing. Over time, this evolved into a rigorous series of examinations on Confucian classics, law, and history. This system allowed for a degree of social mobility, as even a poor student could theoretically rise to the highest levels of government if they were intelligent and hardworking. It created a highly educated class of 'scholar-officials' (mandarins) who provided a stable bureaucracy that lasted for nearly 2,000 years. The concept of standardized testing for civil positions eventually influenced European systems in the 18th and 19th centuries.