Migrants board a train in Keleti station after it was reopened Sept. 3 in Budapest, Hungary. (Matt Cardy/Getty Images)

Four Eastern European go vernments have rejected European Union refugee quotas. But inside each country, there are different views on the migrant crisis and immigration in general.

My research into these countries’ political divisions explains that these differences have to do with how different political camps developed after the fall of Communism.

The uniform rejection of refugee quotas masks the fact that some Eastern European politicians call for supporting the migrants and for voluntarily increased acceptance of refugees from war-torn areas. Other politicians oppose the settlement of non-European refugees in their countries, and want to accept only “easily assimilable” migrants (i.e., Christians).

[Five things you need to know about the European migrant crisis.]

So which political camp takes which stance, and why? How do attitudes toward immigration map onto current political divisions?

In some Eastern European countries, it’s the left-wing that adopts socially liberal positions that lead toward greater openness to immigration. In other countries, it’s the right wing. Which one it is depends on the party’s relationship to communist federalism and to the most politically notable ethnic group.

My work found three political patterns in Eastern Europe.

1. Did the country secede from one of the big Communist federations?

The first pattern occurs in countries like Croatia, Estonia, Latvia and Slovenia, which started their voyage to democracy by seceding from communist federations: either the Soviet Union or Yugoslavia. This secession often resulted in the newly created state harboring a significant proportion of ethnic nationals from the federal center, such as Russians or Serbs.

These diaspora ethnics from the federal center tend to identify with the Communist Party, its successors, or ideologically proximate parties on the left wing. These left parties consequently become either tacit supporters or active mouthpieces of the diaspora ethnic interests.

Consequently, these left party affinities with ethnic minorities encourage left-wing multiculturalism, which informs the left’s more accepting views on immigration issues today. Here voters of the left are frequently ethnic minorities (see figure, below). We know that left parties in these countries take more favorable stances on immigration.

Predicting vote for left parties, European Election Study 2009. Prepared by author

2. Does the country have prominent ethnic minorities that didn’t come from the former USSR or Yugoslavia?

The second pattern occurs in countries such as Bulgaria, Lithuania, Romania and Slovakia, which have other dominant ethnic minorities that do not come from ex-federal centers. Here, left parties have no particular ethnic affinities, and are consequently not inclined to cultural openness. They either ignore ethnic issues or utilize nationalist chauvinism to revive their left-wing ideology, which was compromised after 1989.

This leads the left towards conservative stances regarding all “others.” At the same time, in these countries, the opposition to communism supports market economic outlooks combined with social liberalism, making right-wing parties more sympathetic to concerns of ethnic minorities.

These positions consequently inform their views towards immigrants. Here, left-wing voters tend to oppose immigration (see the figure below marked Eastern Europe), which is the opposite of western Europe (see the figure below marked Western Europe).

Predicting vote for left parties, European Election Study 2009. Prepared by author

Predicting vote for left parties, European Election Study 2009. Prepared by author

Furthermore, in both of these country groups, ethnic minorities tend to be more open to immigration than the majority population (see the figure below). These results emphasize the intimate ideological connection between views on ethnic minority rights and immigration in eastern Europe.

Immigration preferences, European Election Study 2009. Prepared by author.

3. Is it an ethnically homogenous country that never had to break away from a Communist federation?

The third pattern occurs in the Czech Republic, Hungary and Poland. Despite recent references to the Roma minority, these countries are highly ethnically homogeneous and do not have any politically relevant ethnic minority at home. They did not break away from a federation (the Czech Republic was a federal center) and do not have significant domestic minorities.

Instead, what matters here is how much the ex-communist party reformed. Those ex-communist parties that did reform adopted socially liberal views that reject ethnic nationalism and lead toward greater tolerance of immigration. On the one hand, the Czech Republic is home to an intransigent Communist party that represents a left wing rousable by ethnic nationalism aimed against the historical, but no longer present, German minority. Today, the party takes a negative stance on the refugee crisis, supporting strict punishment of illegal border crossing, and proposing to take the European Commission to the Court of Justice.

On the other hand, reformist post-communists who adopted liberal stances defined Polish and Hungarian politics in the 1990s. The left was eclipsed by its nationalist right-wing opponents in the 2000s. Here, it is the conservative right that vocally opposes immigration, while the left (and in Poland also the liberal right) quietly present a more conciliatory stance.

[The migrant crisis is exposing Hungary’s slide toward autocracy. Here’s why the E.U. hasn’t cracked down.]

Furthermore, in Hungary, the right wing, led by Viktor Orban, draws much of its current political identity from its nationalistic support of extra-territorial Hungarian nationals. Interestingly, and in line with the general trends presented above, the Hungarian minority party in Slovakia (Most-Hid) presents one of the most supportive positions towards migrants, pointing out that migration might bring benefits to the receiving countries.

In sum, the diverse views on refugees are based on attitudes towards ethnic minorities. Where the left generally supports ethnic minorities because of its affinity with the federal diaspora, it takes more liberal stances on immigration today. Left parties facing ethnic minorities without this connection tend toward nationalist conservatism. In countries without significant ethnic minorities, the attitudes toward migrants depend on whether the ex-communist party has reformed. The ideological principles about ethnic minorities are now applied to incoming immigrants and refugees who become the new “other.”

Jan Rovny is an assistant professor of political science at Sciences Po in Paris and a researcher at the University of Gothenburg.