A constructivist consensus holds that colonial state building shaped ethnic identities in Africa. To examine this historical process, I study the effect of colonial territorial governance on the (trans-)formation of ethnic identities. I argue that local rulers fostered ethnic identities bounded by administrative borders to increase their power and legitimacy. In turn, local minorities responded to ethnicized local governance through out-migration and assimilation, thereby shaping local ethnic demographics. I examine the effect of administrative geographies on ethnic groups and estimate the discontinuity in ethnic demographics at subnational borders. Exploiting credibly exogenous, straight borders allows for causal identification. I find substantive increases in local population shares of administrative units’ predominant ethnic groups at the border, showing that administrative geographies (trans-)formed ethnic groups. Additional analyses suggest ethnic assimilation, emigration, and political disenfranchisement of local minorities as the phenomenon’s main drivers. These results highlight important effects of territorial state rule on politicized ethnicity in Africa and beyond.