A growing body of research has revealed that firms leverage nationalism in their strategies. However, it is unclear why some firms are more likely to do so than others. This paper uses institutional theory to address this question and examines the influences of domestic and foreign customers. We study firms’ responses to nationalist movements, a type of sociopolitical mobilization arising in response to international controversies. We argue that, as firms attempt to maintain legitimacy with their customers, those with more domestic customers are more likely to endorse nationalist movements, whereas those with more foreign customers from antagonistic countries are less likely to do so. Furthermore, reputation-sensitive customers exert a stronger influence than other customers. However, when firms have foreign customers who are targets of nationalist movements, they face an urgent need to demonstrate their patriotism and hence are more likely to endorse nationalist movements. We find support for these theoretical propositions in a study of Chinese firms’ endorsements of a nationalist movement. Chinese firms that endorsed the movement obtained short-term gains in the stock market and domestic sales but no significant growth in overall sales. These findings contribute to the research on antecedents of firms’ strategic leverage of nationalism, organizational responses to institutional complexity, and corporate side-taking in sociopolitical controversies.