Until the violence broke out last week, it appeared that things had been looking up in Ferguson, Mo., economically speaking.

Foreclosures were down 80%, to just 1% of all houses in the city. The unemployment rate was dropping, and had been below the national average for a while. A number of small businesses had opened in Ferguson’s revitalized downtown, including a bike shop and a wine bar. There is a thriving farmers’ market on Saturdays.

But while the Ferguson and St. Louis region economies were on the upswing, the gains weren’t equally shared. That’s true everywhere in America, where the rich have bounced back from the recession much faster than the poor. But the gains were particularly unequal in Ferguson and its surrounding areas. The unemployment rate for African Americans in the nearby county of St. Louis City was 26% in 2012, according to the Census Department’s latest available stats on employment and race in the area. For white Americans, the unemployment rate was just 6.2%.

These days, income inequality, it seems, is blamed for nearly all social and economic woes. Studies link income inequality to lower infant mortality rates, higher crime rates, and lower economic growth. But it’s not always the evil people think it is. There are a number of areas of the country with income equality—poor, rural areas, for instance—that also have persistently high unemployment rates and no growth. On the flip side, New York City is the most unequal city in America in terms of income, and also one of the most economically dynamic. And while the Occupy Wall Street protests focused on inequality, the outrage in Ferguson, at least on the surface, appears to be about something else entirely: namely, the killing by police of 18-year-old Michael Brown.

Still, St. Louis’ 20 percentage point gap between the unemployment rate of African Americans and white Americans is the largest of any city in America, according to the Census. So, the fact that protests against the treatment of black Americans have erupted there is not a coincidence.

“The level of inequality is not the cause of the problems in Ferguson,” says Larry Mishel, the director of the Economic Policy Institute. “But it’s definitely part of the frustrations.”

Typically, economists measure income inequality using a metric called the Gini coefficient. A score of zero means everyone has exactly the same income. A score of one represents the other extreme. According to the U.S. Census’ latest available figures, St. Louis had a Gini coefficient of 0.52, tied with Miami and lower than (i.e. not as unequal) as New York, New Orleans, and San Francisco. St. Louis County—the larger area around St. Louis, where Ferguson is located—has a lower Gini of 0.48, but it’s still higher than the national average of 0.45.

Income inequality and racial inequality don’t always go hand in hand. Mishel says differences in income between black and white Americans are about the same as they were three decades ago. Yet at the same time, income equality in the country has grown dramatically for everyone. But remember, the fact that members of different races in America continue to receive different, unequal economic opportunities has contributed to the rise in income inequality overall.

Ferguson is a mostly blue collar town, and it is poorer than the St. Louis area in general, particularly compared to nearby Brentwood, a wealthier, predominately white neighborhood. The median household income in Ferguson is $44,000 compared to $75,000 for St. Louis as a whole. The demographics of Ferguson show how the St. Louis area remains segregated. Feguson’s African American share of the overall city population has grown to 66% in 2012, from 52% in 2000.

Like almost all cities in the U.S., manufacturing jobs have moved out of St. Louis, and a number of auto plants have shut their doors. But St. Louis has been able to retain a number of large employers. Emerson Electric EMR , which ranks 121 on the Fortune 500, is based in Ferguson. Boeing BA and Express Scripts ESRX have large offices and facilities nearby.

St. Louis overall has fared better than many other cities in America. But St. Louis’ African American community has, for the most part, not benefitted. So yes, America needs to address the fact that there is a perception, and perhaps a reality, of institutionalize police aggression toward African Americans. But until you figure out how to fix the fact that the U.S. economy treats African Americans and whites unequally the tensions that erupted in Ferguson will continue to be there.