The Trump administration’s first year of immigration policy has relied on claims that immigrants bring crime into America. President Trump’s latest target is sanctuary cities.

“Every day, sanctuary cities release illegal immigrants, drug dealers, traffickers, gang members back into our communities,” he said last week. “They’re safe havens for just some terrible people.”

As of 2017, according to Gallup polls, almost half of Americans agreed that immigrants make crime worse. But is it true that immigration drives crime? Many studies have shown that it does not.

Immigrant populations in the United States have been growing fast for decades now. Crime in the same period, however, has moved in the opposite direction, with the national rate of violent crime today well below what it was in 1980.

In a large-scale collaboration by four universities, led by Robert Adelman, a sociologist at the State University of New York at Buffalo, researchers compared immigration rates with crime rates for 200 metropolitan areas over the last several decades. The selected areas included huge urban hubs like New York and smaller manufacturing centers less than a hundredth that size, like Muncie, Ind., and were dispersed geographically across the country.

According to data from the study, a large majority of the areas have many more immigrants today than they did in 1980 and fewer violent crimes. The Marshall Project extended the study’s data up to 2016, showing that crime fell more often than it rose even as immigrant populations grew almost across the board.

In 136 metro areas, almost 70 percent of those studied, the immigrant population increased between 1980 and 2016 while crime stayed stable or fell. The number of areas where crime and immigration both increased was much lower — 54 areas, slightly more than a quarter of the total. The 10 places with the largest increases in immigrants all had lower levels of crime in 2016 than in 1980.

And yet the argument that immigrants bring crime into America has driven many of the policies enacted or proposed by the administration so far: restrictions to entry, travel and visas; heightened border enforcement; plans for a wall along the border with Mexico. This month, the Justice Department filed a lawsuit against California in response to the state’s restrictions on local police to assist Immigration and Customs Enforcement officers in detaining and deporting undocumented immigrants charged with crimes. On Tuesday, California’s Orange County signed on in support of that suit. But while the immigrant population in the county has more than doubled since 1980, overall violent crime has decreased by more than 50 percent.

There’s a similar pattern in two other places where Mr. Trump has recently feuded with local leaders: Oakland, Calif., and Lawrence, Mass. He described both cities as breeding grounds for drugs and crime brought by immigrants. But Oakland, like Orange County, has had increasing immigration and falling crime. In Lawrence, though murder and robbery rates grew, overall violent crime rates still fell by 10 percent.

In general, the study’s data suggests either that immigration has the effect of reducing average crime, or that there is simply no relationship between the two, and that the 54 areas in the study where both grew were instances of coincidence, not cause and effect. This was a consistent pattern in each decade from 1980 to 2016, with immigrant populations and crime failing to grow together.

In a majority of areas, the number of immigrants increased at least 57 percent and as much as 183 percent, with the greatest increases occurring in the 1990s and early 2000s. Violent crime rates in most areas ranged between a 43 percent decline and a 6 percent rise, often trending downward by the 2000s. Places with a sharp rise in the immigrant population experienced increases in crime rates no more frequently than those with modest or no growth in immigration. On average, the immigrant population grew by 137 percent between 1980 and 2016, with average crime falling 12 percent over the same period.

Because the F.B.I. changed how rape was defined in its crime figures, that category could not be included in this analysis. Focusing on the other components of the violent crime rate — assaults, robberies and murders — still fails to reveal a relationship with immigration rates.

Immigrant

population Assaults Robberies Murders

Most areas experienced decreases in all types of violent crime. The change in assault rates ranged from a 34 percent decline to a 29 percent rise, while robbery rates declined in the range of 12 percent to 57 percent, and murder rates declined in the range of 15 percent to 54 percent.

This analysis is one of the most comprehensive longitudinal studies of the local immigrant-crime relationship. It spans decades of metropolitan area data, incorporating places with widely differing social, cultural and economic backgrounds, and a broad range of types of violent crime.

Areas were chosen to reflect a range of immigrant composition, from Wheeling, W.Va., where one in 100 people was born outside the United States, to Miami, where every second person was. Some areas were home to newly formed immigrant communities; other immigrant pockets went back generations. Controlling for population characteristics, unemployment rates and other socioeconomic conditions, the researchers still found that, on average, as immigration increases in American metropolises, crime decreases.

The foreign-born data, which is collected through the census, most likely undercounts the numbers of undocumented immigrants, many of whom might wish to avoid the risk of identifying themselves. They are, however, at least partly represented in the overall foreign-born population counts.

This is not the only study showing that immigration does not increase crime. A broad survey released in January examined years of research on the immigrant-crime connection, concluding that an overwhelming majority of studies found either no relationship between the two or a beneficial one, in which immigrant communities bring economic and cultural revitalization to the neighborhoods they join.

This article was published in partnership with The Marshall Project, a nonprofit news organization covering the U.S. criminal justice system. Sign up for its newsletter, or follow The Marshall Project on Facebook or Twitter. Anna Flagg is an interactive reporter for The Marshall Project.