The FBI reported Monday that 1,197,704 violent crimes were committed in 2015, up 3.9% from 2014. Violent crime rates are by no means uniform across the country. Some of the nation’s cities are far more dangerous than others.

24/7 Wall St. reviewed violent crime rates in major U.S. cities from the FBI’s 2015 Uniform Crime Report. Violent crime includes all offenses involving force or threat of force and are broken into four categories: murder and nonnegligent manslaughter, rape, robbery, and aggravated assault. For every 100,000 U.S. residents, 372 of these crimes were committed in 2015.

St. Louis, Missouri led the nation with 1,817 violent crimes per 100,000 residents last year. Cary, North Carolina, by contrast, is the safest city in the nation with just 51 reported violent crimes per 100,000 city residents.

Relatively crime-free cities can be found in states just a few hundred miles from some of the most violent places in the country. California is home to cities such as Irvine, Murrieta, and Sunnyvale, which have among the 10 lowest violent crime rates of all U.S. major cities. However, California is also home to some of the most violent cities in the country, including Oakland, which is just 40 miles from Sunnyvale.

15. Washington, District of Columbia

> Violent crimes per 100,000: 1,202.6
> 2015 murders: 162
> Poverty rate: 18.2%
> Unemployment rate: 6.9%

With over 8,000 violent crimes in 2015, Washington D.C. is one of the most dangerous cities in the country. Robberies are especially common in the nation’s capital, with 506 incidents per 100,000 residents, roughly five times the corresponding national rate. There were also 162 murders in the city in 2015, more than in all but nine other cities.

In an interview with 24/7 Wall St., Nancy La Vigne, director of the Justice Policy Center at nonprofit economic and social policy research organization the Urban Institute, noted the highly localized nature of violence in the United States. “We see no connection between state policies and where these trends are up or down,” La Vigne said.

Because many diverse and complex factors can affect violence in a community, it is very difficult to predict and address violent crime. For example, some cities attempt to curb gang violence by increasing enforcement. These efforts, however, are usually not successful, “if you don’t look at issues around structural inequality and reasons why kids may be compelled to join gangs to begin with,” La Vigne explained.

In many cases, the reason for the heightened violence is the lack of law-abiding activities, including — La Vigne noted — employment opportunities. The unemployment rate exceeds the national rate of 5.3% in 19 of the 25 cities with the highest violent crime rates.

Several other social and economic factors have been tied to high violent crime. The vast majority of the cities with the highest violent crime rates tend to also report very low incomes, high poverty, and low educational attainment.

The cause and effect relationship between violent crime and measures of social well-being such as poverty, educational attainment, and employment can go in both directions. For example, people living in high-crime neighborhoods can suffer from stress and other negative social and health outcomes that can limit their chances to obtain an education and gainful employment. Or, businesses may be less likely to locate in high-crime neighborhoods, effectively limiting employment opportunities for local residents.

A relatively small percentage of the population — even within the most disadvantaged communities — is actually engaged in violence, according to La Vigne. Still, every resident of relatively unsafe communities is affected in some way by the violence that occurs there. “The difference between victim and perpetrator is often indistinguishable,” she said.

To identify the 25 most dangerous U.S. cities, 24/7 Wall St. reviewed violent crime rates in cities with at least 100,000 people from the FBI’s 2015 Uniform Crime Report released Monday. The total number and rates of murder, non negligent manslaughter, rape, robbery, and aggravated assault, which are included in the violent crime rate, as well as burglaries, larceny, motor vehicle theft, and arson — all classified as property crime — also came from the FBI’s report. We also considered these data for each year from 2011 through 2015. Annual unemployment rates for 2015 came from the Bureau of Labor Statistics (BLS). Median household income, poverty rates, the percentage of adults with at least a bachelor’s degree, population, and the percentage of adults with at least a high school diploma came from the U.S. Census Bureau’s American Community Survey (ACS).

Click here to see America’s 25 most dangerous cities

Click here to see America’s 25 safest cities