In response to rising immigration flows and the fear of Islamic radicalization, several Western countries have enacted policies to restrict religious expression and emphasize secularism and western values. Despite intense public debate, there is little systematic evidence on how such policies influence the behavior of the religious minorities they target. In this paper, we use rich quantitative and qualitative data to evaluate the effects of the 2004 French headscarf ban on the socioeconomic integration of French Muslim women. We find that the law reduces the secondary educational attainment of Muslim girls, and impacts their trajectory in the labor market and family composition in the long run. We provide evidence that the ban operates through increased perceptions of discrimination and that it reduces assimilation by casting religion and national identities as incompatible.