 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 <unk> ) . 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 . <unk> 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 <unk> ) were prefectures ( fu <unk> ) operating under a prefect ( <unk> <unk> ) , followed by subprefectures ( zhou <unk> ) under a <unk> . The lowest unit was the county ( xian <unk> ) , overseen by a magistrate . Besides the provinces , there were also two large areas that belonged to no province , but were metropolitan areas ( jing <unk> ) attached to Nanjing and Beijing . 
