We study the effect of an influx of approximately three million Syrian refugees on voting behavior in Turkey. The analysis is based on data from three recent general elections, 54 waves of a monthly survey on voter preferences as well as a unique field survey that directly measures voter attitude towards refugees. We exploit the substantial variation in the inflow of refugees, both over time and across provinces, and use a difference-indifferences approach, comparing the political outcomes in geographic areas with high and low intensity of refugee presence before and after the beginning of Syrian civil war. To address the endogeneity in refugees location choices, we adopt an instrumental variables approach that relies on the historic dispersion of Arabic speakers across Turkish provinces, taking advantage of the fact that Syrians are more likely to settle in locations where the host population speaks Arabic. Empirical analyses of survey data documents strong polarization in attitudes towards refugees between the supporters and opponents of the ruling Justice and Development party (AKP). Regression analyses of political preferences, however, suggest that the massive inflow of refugees induced a modest and statistically significant drop in support for the ruling AKP. Leavers did not swing to the other major political parties but were more likely to become indecisive or absentee. We show similarly small, but statistically insignificant impact on actual election outcomes during the study period. Based on other questions in the survey data, we interpret our findings as suggestive that while partisanship is highly correlated with public opinion towards refugees, exposure to refugee has little impact on electoral outcomes.