This article studies the impact of immigration on the share of votes to the Republican and Democratic Party in US elections between 1994 and 2012. Our analysis is based on the variation across states and years and addresses the issue of endogeneity of immigrant flows using a set of instruments that leverage distance from country of origin and historical settlements of foreign-born to obtain a proxy for supply-driven immigration flows. Pooling all elections, immigration to the U.S. had a negative average impact on the vote share to the Republican Party. This is consistent with the typical view of political analysts in the U.S. However, this average effect – mainly detectable in House elections – has two components. When the growth of the immigrant population is due to an increase in naturalized migrants, the effect on Republican vote is clearly negative. Yet, when the share of non-citizen migrants in the population increases and their share in the state population is large – making immigration a salient policy issue – the impact on the Republican vote share is positive. These results are consistent with stronger voting preferences of naturalized immigrants for the Democratic Party relative to native voters, but also with native voters' political preferences shifting towards the Republican Party in places with high immigration of non-citizens. In our estimates, the second effect is only significant when immigrants are a large portion of the local population.