The emergence of anti-immigrant parties in Western Europe has provoked very different responses from mainstream parties. Some have tried to counter the anti-immigrant parties while others have tried to recapture lost voters by taking a tougher stance on immigration. Country comparative studies have tried to determine the effectiveness of different strategies, but systematic testing has been impaired by small-n problems. This paper therefore exploits sub-national variation in 290 Swedish municipalities to investigate the effect of mainstream party strategy on anti-immigrant electoral success. The paper finds that a tougher stance on immigration on the part of mainstream parties is correlated with more anti-immigrant party support, even when controlling for a large number of socio-economic, historical and regional factors. This result indicates that mainstream parties legitimize anti-immigrant parties by taking a tougher position on immigration. However, the results presented in the paper show that it is not sufficient for one mainstream party to take a tougher position; it is only when the entire political mainstream is tougher on immigration that the anti-immigrant party benefits. What is more, the toughness of the parties on the left seems to be more legitimizing than the toughness of the parties on the right.