How does local demographic context shape political behavior? We investigate how racial isolation, one of the natural consequences of structural segregation, is related to racial voting in South Africa. Using a variety of new datasets, which include for the first time high resolution census data from before the end of apartheid, we leverage plausibly exogenous variation in the extent to which local segregation persisted after the end of apartheid to study this relationship. Whites who are more isolated engage in more racial voting, measured as the probability of voting along racial lines, against black political parties. Using geo-referenced survey data for over 39,000 people we then present individual level evidence consistent with our findings, and discuss potential mechanisms. [ABSTRACT FROM AUTHOR]