This paper studies the impact of immigration on public policy setting. As a natural experiment, we exploit the sudden arrival of eight million forced migrants in West Germany after World War II. These migrants were on average poorer than the West German population, but unlike most international migrants they had full voting rights and were eligible for social welfare. Using panel data for West German cities and applying differencein- differences and an instrumental variables approach, we show that local governments responded to this migration shock with selective and persistent tax raises as well as shifts in spending. In response to the inflow, farm and business owners were taxed more while residential property and wage bill taxes were left unchanged. Moreover, high-inflow cities significantly raised welfare spending while reducing spending on infrastructure and housing. Election data suggest that these policy changes were partly driven by the political influence of the immigrants: in high-inflow regions, the major parties were more likely to nominate immigrants as candidates, and a pro-immigrant party received high vote shares. We further document that this episode of mass immigration had lasting effects on peoples preferences for redistribution. In areas with larger inflows in the 1940s, people have substantially higher demand for redistribution more than 50 years later.