Children in Brownsville, Brooklyn, play near a shrine for a child shot dead on 1 September. Democratic candidates have been vocal opponents of the police department's stop-and-frisk policy. Photograph: Spencer Platt/Getty Images

A man calling himself "Uncle" surveys the scene. It's growing dark, and a misty rain is falling over Brownsville, in central Brooklyn, over rows of social housing blocks that rise into the clouds. Above us, the No 3 subway line runs on elevated tracks, held up by rusty scaffolding that shakes alarmingly as the train rolls by.

"A tale of two cities? Yeah, ain't that the truth! Take a look around you. This is Brownsville. There's none of the pretty stuff you get in Manhattan. This place is full of projects, it's wild, you got to be careful. People here are left behind." In the past few weeks "a tale of two cities", the campaign mantra of Bill de Blasio, who is poised to become Democratic candidate for New York mayor, has caused a stir.

He has adopted Charles Dickens's book title as a way of harnessing growing frustration about the glaring inequalities of the city, with Manhattan's spanking midtown skyscrapers and booming Wall Street banks seeming to mock the struggles of New Yorkers in the outer boroughs.

Joe Lhota (pronounced in thick Brooklynese "Loader"), the Republican mayoral candidate, has gone further, warning that De Blasio will set New York back to the bad old days of the 1970s when it was broke, crime was rampant and swaths of the city were no-go areas. But to the folk heading home in the dusk of Brownsville, such political cat-fighting makes no sense. A tale of two cities – how could anyone think otherwise?

Nikita, 17, says that when she sees young men being frisked on the street, as she often does, she gets angry. But she doesn't do anything to intervene because "the manner in which the cops do it, I'm scared they might open fire". Kimony, 18, has been stopped nine times and says: "It makes me feel bad. Say a man's got a little bit of weed on him, it's not that serious, we're not going to sell it, we're just dealing with the stress of getting through the day."

Kimony has been looking for work for six months. "Crime wouldn't be as high as it is if everybody had a job and something to do. They need to come up with employment."

Brownsville, Precinct 73 on the police map, is at the top of the stop-and-frisk league table, along with neighbouring East New York and parts of the South Bronx. In 2011, police in Brownsville carried out 25,167 stops on suspicion of being involved in crime or carrying guns; of those 23,748 involved African Americans or Latinos.

"We've been talking about a tale of two cities for years now," says Donna Lieberman, head of the New York Civil Liberties Union, which has carried out definitive research into stop and frisk. "The divide is, sadly, a racial divide. Bloomberg's perspective is from that of affluent white New Yorkers. It's easy to ignore the human toll these policies take on New Yorkers of colour who cannot send their teenager out for a quart of milk without imagining they will be stopped and thrown to the ground by the NYPD."

Talk of a divided city would have been political suicide in previous mayoral elections. The city's appalling reputation for crime – its crack-fuelled annual murder rate peaked in 1990 at 2,262 – spread moral panic across the five boroughs and helped propel naturally Democratic-leaning voters into the arms of Republicans Rudy Giuliani and Bloomberg from 1994 until today. Two decades after the last Democratic mayor, David Dinkins, occupied Gracie Mansion in this overwhelmingly liberal city, something has clearly shifted to allow De Blasio to invoke a tale of two cities without fear of oblivion at the polls. It is partly that the crime rate has steadily fallen to historic lows – 418 murders last year – giving the city a new confidence.

It is partly that the power of the white vote has been diluted as the demographic make-up of the city has changed. Whites have declined as a proportion of the population from 43% in 1990 to 33% today, while Hispanics have increased from 24% to 29% (blacks have remained steady at 25%).

And it is partly that after 12 years of Bloomberg leadership, New Yorkers across the board are ready for change. That was underlined by exit polls after Tuesday's primary election that showed four out of five voters wanted a new direction for the city.

Paradoxically, the economic ailments that De Blasio has used as a stick with which to beat Bloomberg – the growing inequalities since the 2008 crash – have been due to forces outside the mayor's control. "The national economic recovery has exacerbated inequality – but the mayor of New York has no power to influence that national picture," says Mitchell Moss, an urban policy expert at New York University. "De Blasio has taken a national trend and localised it very skilfully to his advantage."

Talk of two cities drives Bloomberg supporters mad. They say that New York has weathered the national recession better than the rest of the country, with three times the number of jobs generated than were lost in 2008.

Figures from the department of labour show that between 2008 and 2012 Brooklyn was the borough leader in terms of new private-sector jobs at 9.6%, with the Bronx second at 5.6% and Manhattan fourth on 1.2%.

Yes, but … cut the figures another way and the inevitable gulf rears its ugly head again. Manhattan has an overall unemployment rate below the national average – at about 7.8% – while Brooklyn's is at 9.6% and the Bronx's is 11.8%. Besides, as Kenneth Sherrill, a political scientist at Hunter College of the City University of New York, notes, De Blasio's complaint is about so much more than economics. "As curious as this may sound, I think that it's not nearly as much about economic issues as about the question of respect," he says. "Bloomberg is not interested in the opinions of everyday working people who live in the outer boroughs. The mayor does not see them as part of the economic engine of the future even though it was on their backs that this city was built." Victor Kingsberry, 62, knows how it feels to be on the receiving end of such a deficit of respect. He's worked for years in Brownsville schools and is now retired, though a lifetime of public service hasn't prevented him from being stopped and frisked twice.

As a primary-school teacher, he thinks he has a good idea of what young people need to get on. Yet he sees precious little of it coming out of City Hall and into Brownsville. Under Bloomberg's education policy, money has been pumped into charter schools sponsored by businesses. Kingsberry has watched as the smarter children have been creamed off through selection, leaving the traditional public schools even more depressed.

He's heard a lot of political chat about how the rich in Manhattan are generating taxes that pay for better services in places like Brownsville. In a recent interview Bloomberg even had the gall to suggest: "Wouldn't it be great if we could get all the Russian billionaires to move here?"

But Kingsberry wonders in that case where all the money has gone. "Rich people aren't paying their taxes: they get tax breaks. And if they did, that money sure isn't coming out here. If it was, we'd have after-school programmes, training programmes, summer schools." So many of the pupils he has worked with over the years have become trapped in a vicious circle. They don't see themselves getting a job, so education appears pointless and they drop out, ending up unqualified and unemployed. "There are no opportunities for these kids, no sign of hope," he says. "So they turn to crime, start to steal iPhones. Everybody deserves a future. These kids aren't getting it."