Last week, following the dispersion of harrowing images of human suffering coupled with increasing public pressure, some previously resistant European leaders began to warm up to the idea of allowing more Middle Eastern migrants into their countries. Many Europeans—notably, those in Sweden, Iceland, the Greek Island of Kos—have been caring for the refugees, acknowledging the probable economic burdens but letting compassion subsume them. Others in Europe, though, hesitate out of fear that migrants will take jobs, threaten social cohesion, and raise welfare spending.

An influx of migrants might indeed have negative effects on native workers’ wages—that’s why some nations are banning the migrants from working—but sometimes, the effects of a migration can have a positive effect on native workers’ wages. The effects of a mass migration on the labor market differ from case to case.

Economists generally agree immigration is mostly good for a nation. They even have a term for it: “Immigration surplus” refers to the positive effect immigration has by creating new demand for goods and services, which encourages employers to hire more people. And if migrants replace incumbent workers, even though wages are lowered, goods and services are produced more cheaply. In 2007, the White House concluded that immigration to the U.S. has an overall positive effect on the country. The winners are broadly distributed and the primary losers are incumbent workers, whose wages fall until the resulting economic growth boosts their wages in the long run.

Less recent American history does provide an example of when the wages of incumbent workers were suppressed as the result of a migration. It was after the Great Migration, a movement of 7 million Southern-born black people (and several Southern white people too) between roughly 1910 and 1970. One reason the Great Migration depressed wages was that jobs at the time were racially segmented—foundries were for black workers and car factories were for white workers—which meant that newly arrived black workers were competing only for “black” jobs. This represents the largest increase in black workers’ share of the labor force in U.S. history.

Around 1910, white-on-black violence in the South and boll weevils’ devastation of Southern cotton spurred the Great Migration, and it surged later in the decade as demand for labor increased as American production ramped up for the war effort. The migrants made their way to a handful of Northern industrial cities, and Detroit, Pittsburgh, and Chicago had the largest influxes relative to their populations. The supply of black workers in the North almost doubled, and in labor markets for some industries and some skill levels, it tripled, or more. Leah Platt Boustan, an economist at UCLA, estimates that wages for black workers in the North would have been 7 percent higher by 1970 if the supply of black labor hadn’t swelled as it did.

Sometimes, employers used these migrants’ eagerness to work for their own gain, pitting them against unionized workers. In fact, Henry Ford, who in the 1940s employed 50 percent of all black people in Detroit, regularly used them to break strikes. (In 1928, Arthur Blind Blake recorded “Detroit Bound Blues,” which included the line, “I’m goin’ to get a job, up there in Mr. Ford’s place.”) The painter Jacob Lawrence completed a series of 60 paintings about the Great Migration, including one panel illustrating the use of strikebreakers. “Race riots were very numerous all over the North because of the antagonism that was caused between the Negro and white workers,” reads the caption Lawrence wrote for that panel in 1941.

Most of all what this demonstrates is how racial divides can exacerbate the strife that comes along with an influx of new workers—a lesson that should be concerning as we consider the situation today. Citizens, unions, and leaders will have to take a position on desperate migrants based on their own convictions and economic interests. Many Syrian refugees are skilled and young—just the thing, perhaps, for Germany’s aging and shrinking labor force. The country figures that in four or five years, those economic benefits may outweigh the $11 billion per year it costs to take migrants in. (This, of course, ignores the role of humanitarianism in the equation.)

But, unfortunately, Europe is primed for some ugly competition between native workers and new arrivals, as prejudice, austerity, and labor insecurity—three features of many European economies today—are sure to make any migrant crisis worse.