 The Ming emperors took over the provincial administration system of the Yuan dynasty , and the thirteen Ming provinces are the precursors of the modern provinces . Throughout the Song dynasty , the largest political division was the circuit ( lu 路 ) . However , after the Jurchen invasion in 1127 , the Song court established four semi @-@ autonomous regional command systems based on territorial and military units , with a detached service secretariat that would become the provincial administrations of the Yuan , Ming , and Qing dynasties . Copied on the Yuan model , the Ming provincial bureaucracy contained three commissions : one civil , one military , and one for surveillance . Below the level of the province ( sheng 省 ) were prefectures ( fu 府 ) operating under a prefect ( zhifu 知府 ) , followed by subprefectures ( zhou 州 ) under a subprefect . The lowest unit was the county ( xian 縣 ) , overseen by a magistrate . Besides the provinces , there were also two large areas that belonged to no province , but were metropolitan areas ( jing 亰 ) attached to Nanjing and Beijing . 
