The police shooting of Michael Brown was the spark.
But the tinder fuelling the anger and resentment that has exploded in Ferguson in the US state of Missouri has been building for decades.
Moving vans have carried off many middle-class homeowners who eagerly bought brick homes with yards in St Louis' northern suburbs after the second world war. They've been replaced by poorer newcomers. Dependable jobs for those without college degrees have grown scarce. The factories that once sprouted there have closed. With town budgets strapped, local schools have struggled.
Yet local governments, slow to evolve, are staffed mostly by whites, unlike the people they represent. That has created a chasm between whites and the local black community.
"For a young black man, there's not much employment, not a lot of opportunity," said Todd Swanstrom, a professor of public policy at the University of Missouri. "It's kind of a tinder box."
Seething tensions exploded after a white police officer shot and killed Brown, an 18-year-old black. Missouri Governor Jay Nixon declared a curfew to get people off the streets. Some in the crowds have looted local stores.
Critics say the police's initial heavy-handed response, firing tear gas and rubber bullets, touched off the unrest, pitting a police force of mostly white officers against crowds filled mainly with blacks.
Since Brown's death, race and police tactics have dominated the headlines coming from the suburb 19 kilometres northwest of St Louis' Gateway Arch. But that's only part of the story.
From jobs to schools to demographic transitions, Ferguson and its neighbouring towns, where many protesters live, have undergone sweeping changes in recent years. Some places have become pockets of poverty, comparable to the poorest spots in St Louis, once a hub for corporations such as Anheuser-Busch and Ralston-Purina, which drew generations of immigrant labourers.
Some towns, like Ferguson, are economically mixed, with middle-class subdivisions alongside run-down streets and big apartment complexes like the one where Brown lived. Either way, Swanstrom said, the area highlighted the growing challenge of the "suburbanisation" of poverty.
"This was a catalyst for something much deeper, the lack of economic opportunities and representation people have," said Etefia Umana, an educator and board member of a group called Better Family Life. "A lot of the issues are boiling up."
It's been boiling for decades. St Louis' jumble of suburbs - 91 municipalities exist in a county of about one million people ringing the city - has long been sharply segregated. Until the late 1940s, restrictive covenants blocked blacks from buying homes in many towns.
Well into the 1970s, tight zoning restrictions and other rules, especially in places near the city's mostly black north side, kept many areas largely white, said Colin Gordon, a University of Iowa professor who's studied housing in St Louis.
That began to change by the 1980s, when middle- and working-class white families began leaving the area around Ferguson for newer, roomier housing in more distant suburbs. In their place came a flood of black families from St Louis in search of better housing and schools.
"When black flight out of the city began, this was the logical frontier," Gordon said. "It became what the city had been, a zone of racial transition."
In Ferguson, the change happened fast. In a generation - from 1990 to today - the population changed from three-quarters white to two-thirds black. Even as the area's demographics shifted, solid blue-collar jobs sustained many of these towns, said Lara Granich, a community organiser.
"Everyone in our parish was a bricklayer or a letter carrier or something. I didn't know anyone who had gone to college, but they all made a decent living," said Granich, who grew up in nearby Glasgow Village, another neighbourhood that's declining. "The people who live there now tend to work at McDonald's."
That meant that many people were earning the minimum wage, and then came the recession. That part of the St Louis region took the brunt of the foreclosure crisis, with subprime loans turning bad and investors scooping up cheap houses. Car plants that had sustained the black middle class shut down.
Since 2000, the median household income in Ferguson has fallen by 30 per cent when adjusted for inflation, to about US$36,000. In the US census tract where Brown lived, median income is less than US$27,000. Just half of the adults work.
Father Steven Lawler, rector of St Stephen's Episcopal Church in Ferguson, said he noticed the change in 2008, when visits to his food pantry spiked. They haven't dropped since.
"I know there are places where an economic recovery's happening," he said. "But in the places where people are most stressed, there hasn't been a recovery."
Still, as Lawler and others note, Ferguson has some things going for it. Its pleasant, old downtown has seen a revival in recent years, with a busy Saturday farmers' market and a new craft brewery.
Gail Babcock, programme director at Ferguson Youth Initiative, was quick to note her town still had a strong sense of community. Every morning last week volunteers poured in to clean up from protests and looting. The challenge is in connecting its poorer residents - especially younger ones - to that group.
"It's very hard for them to find jobs," said Babcock, who runs a community service programme for youth convicted of minor criminal offences. "That sets up a situation where they tend to get in trouble, and they probably wouldn't under other circumstances."
Then there are the schools, one reason why many families moved to these suburbs in the first place. Two districts - including the one where Brown graduated from high school in May - have lost their state accreditation in recent years.
That was a big reason why John Weaver took the morning off work on Friday, drove his plumbing truck to Florissant and asked the visiting governor what he planned to do about the problems that have plagued these neighbourhoods for years.
Nixon acknowledged that there was "a lot of work to do". Weaver was not impressed. "All these politicians say they'll fight for our education. I feel cheated," he said in an interview later. "And if I feel cheated, how should these kids feel?"
These issues are all tied together for Shermale Humphrey, a 21-year-old who joined the protests last week. She plans to enlist in the air force, but right now works at a McDonald's near to where Brown was shot. She's something of a veteran activist - helping to organise strikes by fast-food workers in St Louis - and sees race and local politics and economics as closely intertwined.
"It's a shortage of everything," she said. "It's a shortage of jobs. Of African-Americans on the police force and in government. Of people not being able to get a good education."
Adding to the frustration, many protesters say, is that the people still running many of these towns don't look much like the people who live there now. Just three of Ferguson's 53 police officers are black. Six of seven city council members are white, as are seven school board members, where the student body is 78 per cent black.
Many of these towns were still run "like little fiefdoms" by remnants of their old white middle class that may not share the concerns of newcomers, said Umana, who moved to Ferguson eight years ago.
It had been hard to build black political leadership in these fast-changing suburbs, said Mike Jones, a black veteran of St Louis' political scene. Indeed, it's been harder than in St Louis, which has long been racially mixed.
But a more diverse set of voices at Ferguson city hall, Jones said, might have avoided the heavy-handed police response that only inflamed protests.
"The question is how - in a city that's 67 per cent African-American - do you have absolutely no African-American political representation?" Jones asked. "That's what leads you to a police force that could become involved in this sort of incident."
A study last month by the Brookings Institution found the number of poor people living in high-poverty suburban neighbourhoods nationwide more than doubled in the last decade, growing much faster than in big cities.
Chris Krehmeyer, who runs St Louis-based community development non-profit Beyond Housing, says he knows colleagues around the country dealing with a lot of the same issues as he is in north St Louis county, tackling housing, jobs and schools all at once.
Ferguson was a bellwether, he said. "This story could happen in lots of different places, all over this country."