The Qing code was the last legal code of imperial China. By the end of Qing dynasty, it was the only legal code enforced in China for nearly 270 years. Even with the fall of imperial Qing in 1912, the Confucian philosophy of social control enshrined in the Qing code remain influential in the German-based system of the Republic of China, and later, the Soviet-based system of the People's Republic of China. Part of the Qing code were practice in British Hong Kong until 1971.