Shipping containers in a terminal at the Yangshan port in Shanghai on March 23. (Qilai Shen/Bloomberg News)

As promised, the Trump administration has launched a trade war with China. The markets are going down as tariffs are going up. These opening salvos could have drastic implications for both the U.S. and Chinese economies.

That makes understanding how trade affects U.S. workers all the more important. My research suggests that when regions lose jobs to free trade, it has a small but measurable effect on whether voters in those communities support free trade. But such losses have an additional effect on public opinion that relates directly to President Trump’s election: People living in regions hurt by free trade become not only more protectionist, but also more antiforeign or “nativist.”

How I did my research

Determining who may be hurt by free trade isn’t simple. It is not necessarily the stereotypical manufacturing worker who loses his job when the factory where he has worked for 30 years closes. Opinions about free trade are only weakly related to an individual’s occupation.

Rather, when free trade hurts a region’s economy, the results spill over and affect the workers’ friends, neighbors, favorite businesses and local community. When a major employer leaves town, it can leave behind pockets of economic and social malaise, with spillover effects that include declining marriage rates, increased mortality due to substance abuse and suicide, and rising crime.

In my research, I examine how individuals feel about free trade based on whether they live closer to or farther from firms that have recently laid off workers because of it. To do that, I combined 21 Pew Research Center surveys conducted from 2000 to 2016 with data on how many people in an area applied for a federal government program called Trade Adjustment Assistance (TAA). This program provides various benefits to eligible workers, including job training, extended unemployment insurance, and additional allowances for relocation and job-search expenses.

TAA applications are a noisy proxy for the economic fundamentals that separate free trade’s winners and losers. However, they give us a sense of who believes they lost their jobs because of free trade.

Across the United States’s approximately 3,140 counties between 2000 and 2016, the annual average number of trade-related layoffs captured by TAA applications is only 1.46 per 1,000 workers. But the concentration varies dramatically by region, of course. In the areas worst hit by the Great Recession, the Labor Department deemed as many as 10 percent of some counties’ workers to be eligible for TAA compensation. If you expand that figure to include applications that the department denied, as many as one-third of some counties’ workforces say they lost jobs because of free trade.

What happens when a community loses jobs to free trade

In communities with higher numbers of layoffs due to trade, survey respondents were more likely to say that free trade was a “bad thing” for the United States. This is based on a statistical model that accounts for several other factors, including the overall unemployment rate in the county. If just four more people out of 1000 in a particular county were laid off because of free trade, opposition to free trade increased by 1 percent.

Most Americans live in counties that had between zero and nine trade-induced layoffs per 1,000 residents. Such small numbers, of course, resulted in only a small change in the county’s attitude toward free trade — but small is larger than nothing. These layoffs do matter.

And the relationship between opinions about free trade and trade-induced layoffs is larger when those layoffs occur closer to respondents. To calculate this, I measured the distances in miles between each survey respondent and all firms filing for TAA support. The effects are strongest for those who live 25 to 100 miles from firms with trade-related layoffs.

Not surprisingly, in other words, the immediately surrounding community felt the layoffs most keenly.

But other opinions changed, as well. Individuals living in communities with more layoffs were more likely to think poorly of immigrants — and were less likely to support having the United States act as a global leader. They were, in other words, more nativist and isolationist.

Although the increased nativism isn’t as strongly linked to the job losses as the increased protectionism is, the correlation nonetheless is consistent with the idea that economic hardship and antiforeign resentment are connected. When people face economic hardships, they may blame that situation on other groups.

Trump’s tariffs respond to his voters’ dislike of free trade — and to the nativist attitudes that can follow economic hardship.

James Bisbee (@JamesBisbee) is a PhD candidate at New York University’s Wilf Family Department of Politics, studying the domestic political economy of trade in the United States. The interpretations and views expressed here are those of the author and not meant to reflect those of the Pew Research Center.