What are the distributional consequences of migration, and how do they affect attitudes toward migration? In this paper we leverage a natural experiment generated by the ousting of former Libyan dictator Muammar Gaddafi, which created an unprecedented influx of economic migrants from African countries to Europe. This surge of low-skilled labor benefited low-productivity firms by lowering their production costs and expanding their labor supply. Employing a triple difference-in-differences design, we document that attitudes toward migration became more positive in Western European regions with large shares of migrants and low-productivity firms. Evidence from Sweden, which provides finely grained geographical data, confirms these findings. We then test the economic microfoundations of this attitudinal shift. We show that the surge in the supply of low-skilled labor increased the profitability of low-productivity firms more in areas that experienced larger migration flows. We find no evidence that migration worsened natives’ labor market conditions.