The interplay between experiences of demographic diversity and attitudes toward out-groups is much discussed in the social science literature. But empirical findings are equivocal about the direction and extent of the causal relationship: the contact hypothesis posits that increased contact leads to more favorable attitudes, while the conflict theory suggests the opposite. I argue that these two approaches conflate variation in the duration of contact and mismeasure the degree to which groups are perceived as outgroups. Greater long-term diversity may induce individuals to be more restrictionist toward out-groups they have hardly interacted with because the decrease in their uncertainty about the distribution of benefits and costs can make the relative front-loading of costs more salient. Using data from the Chinese General Social Survey and the China Economic Census, I show that long-running diversity at the provincial level is associated with greater restrictionism toward foreigners, a demographic group so rare in China that most Chinese respondents likely had not interacted with them as of 2008. The results also contribute to our understanding of a context in which the issues of immigration and inter-group relations are understudied.