Ever since the fatal police shooting of 24-year-old Jamar Clark in Minneapolis last week, Black Lives Matter protesters had been camping outside the 4th Precinct police station to demand justice.

Last night, five people there were shot, apparently by three white male counter-demonstrators, according to the Minneapolis Star Tribune. No one was killed, but the suspects are still on the loose, even though the gunfire occurred only a block away from the police station, as the Tribune reports. Witnesses say the shooters were white supremacists.

For those familiar only with the popular perception of Minneapolis as a hip-yet-wholesome millennial haven, news of these tragedies can seem like dispatches from an alternate reality. But the city's racial tensions, its problems with policing and entrenched inequality, have been worsening for years.

This is the real Minneapolis: a historically white city struggling with what it means to be truly diverse.

Earlier this year, I had a conversation with Nekima Levy-Pounds, the Minneapolis NAACP president. In June, activists successfully lobbied to overturn the city's spitting and lurking ordinances. These laws had been used disproportionately against black residents, according to an ACLU analysis of public records.

Theirs was a small victory, but a symbolically important one. The Ferguson protests had mobilized a fervent Minneapolis contingent, who saw in their own city the same dangerous potential for racial fracture.

"Minneapolis and Ferguson are closer than you think," Levy-Pounds told me in June. "The ingredients are here for that kind of uprising. When you combine economic injustice with police abuse, that opens the door to uprisings and riots."

Watch: Protesters dig in outside Minneapolis police station (Gillian Brockell/The Washington Post)

For months, the Minneapolis chapters of Black Lives Matter and the NAACP have been agitating for police reform and for political reform. This work did not attract much national attention, perhaps because few from outside the region think of Minneapolis as a city with a race problem.

"The narrative has been that Minneapolis is one of the most livable cities, one of the most literate and one of the most affluent," Levy-Pounds said in June. "We're saying yes, but for white people."

As recently as March, Minneapolis was being praised in the news for its seemingly contradictory accomplishments of high employment, prosperity and affordable housing. I explored the phenomenon in a post in March, from which the following is adapted.

As Derek Thompson wrote in the March issue of the Atlantic:

What’s wrong with American cities? is a question that demographers and economists have debated for years. But maybe we should be looking to a luminary exception and asking the opposite question: What’s right with Minneapolis?

As he detailed, the area is a corporate hub that employs a generous swath of educated middle-class workers. The region possesses an ample supply of housing, too, its suburbs sprawling free in every direction. The city also is isolated enough that people find it hard to leave. Where would you go? Iowa?

On top of these advantages, Thompson credited two policies that spread out the rewards and responsibilities of growth. In 1971, municipalities in the Minneapolis-St. Paul orbit agreed to share a portion of their commercial property tax revenue. Then, in 1976, Minnesota passed a law requiring every neighborhood in the metro region — both the suburbs and the inner core — to build affordable housing.

These initiatives helped smooth the jagged inequities that often accompany increased prosperity. But how much did they contribute to what Thompson called the Minneapolis “miracle”? And just who benefited from these policies?

The questions arise because Minneapolis has another quirk, one that’s a bit more difficult to talk about: It’s really white. In the 2010 Census, about 79 percent of people in the Minneapolis-St. Paul-Bloomington area said they were non-Hispanic white. Only 8.4 percent said they were non-Hispanic black.

Consider the other large metropolises that the Atlantic praised for being both upwardly mobile and affordable. These, too, are exceedingly white metropolises: Salt Lake City (75 percent white, 1.8 percent black) and Pittsburgh (87 percent white, 9.2 percent black). The New York metro area, in contrast, is less than half white.

Race is directly related to the question of whether children born to poorer parents will prosper. The authors of the Harvard-Berkeley study of intergenerational mobility devote a section to discussing the connection. “The main lesson of this analysis [in this section] is that both blacks and whites living in areas with large African American populations have lower rates of upward income mobility,” they write. They cannot pinpoint why, exactly, but they speculate that segregation plays a role by increasing inequality.

In the 1970s, when the equitable growth policies were being passed, the Minneapolis area was 94 percent white and 2 percent black. Few people lived in segregated areas, because few people were minorities to begin with.  It’s easy to pass redistributive tax agreements when your neighbors are more or less homogenous. (This is another way that Minneapolis, where many people have Scandinavian ancestry, resembles the welfare nations of northern Europe.) The city’s successes have the whiff of a chicken-or-egg riddle. Minneapolis has had some success combating urban rot and maintaining a large, healthy middle class. But it’s also never had to seriously struggle with these issues.

The picture is less rosy these days. Since the 1970s, the city’s minority population has swelled, and segregation has worsened, particularly in its schools. About 62 percent of black students attend high-poverty schools, compared with 10 percent of white students. Beyond Minneapolis, the state of Minnesota has one of the largest gaps in black-white student achievement. Recently, WalletHub analyzed the black-white gap in census indicators such as household income, homeownership and educational attainment. It ranked Minnesota as the worst state for financial inequality.

Over the past 40 years, other cities have been puzzling over how to share opportunity with people who had been systematically denied it for centuries. Minneapolis largely sat out that debate, and its lack of experience shows. Consider these maps from the Urban Institute of people living below the poverty line.

Poverty, particularly nonwhite poverty, has been pooling in the city for decades. As Thompson mentions, the city once had vigorous schemes to bust up concentrated poverty. Those efforts have fallen by the wayside, and today, low-income housing is mostly being built downtown, further clustering the poor. The MinnPost noted in 2010 that Minneapolis has race and income gaps between its urban core and wealthy suburbs and is doing worse on these measures than peer cities such as Denver, Seattle and Portland.

This is not to dispute that the Twin Cities area has a lot of comfortable, affordable neighborhoods, which is the premise of the Atlantic’s piece: there are good jobs in Minneapolis, and living there is fairly cheap. But this has also been developing serious problems with racial disparities and segregation, issues that its equitable-growth policies have done little to fix.