We develop a dynamic model of identity formation that explains why ethnic minorities may choose to adopt oppositional identities (i.e. some individuals may reject or not the dominant culture) and why this behavior may persist over time. We first show that the prevalence of an oppositional culture in the minority group cannot always be sustained in equilibrium. Indeed, because the size of the majority group is larger, there is an imposed process of exposition to role models from the majority group that favors the diffusion of mainstream values in the minority community. In spite of this, an oppositional culture in the minority group can nevertheless be sustained in steady state if there is enough cultural segmentation in terms of role models, or if the size of the minority group is large enough, or if the degree of oppositional identity it implies is high enough. We also demonstrate that the higher the level of harassment and the number of racist individuals in the society, the more likely an oppositional minority culture will emerge. We finally show that ethnic identity and socialization effort can be more intense in mixed rather than segregated neighborhoods.