In late imperial China, the examination system was the primary mechanism by which the central government captured and held the loyalty of local-level elites. Their loyalty, in turn, ensured the integration of the Chinese state, and countered tendencies toward regional autonomy and the breakup of the centralized system. The examination system distributed its prizes according to provincial and prefectural quotas, which meant that imperial officials were recruited from the whole country, in numbers roughly proportional to each province's population. Elite individuals all over China, even in the disadvantaged peripheral regions, had a chance at succeeding in the examinations and achieving the rewards and emoluments office brought.