The New York City mayoral race is entering its final days, and it seems all but certain that Bill de Blasio will be the new master of City Hall. That’s prompted anxiety among some in New York, best encapsulated by an ad run by Republican challenger Joseph Lhota warning that the city would revert to a 1970s crime-ridden cesspit if de Blasio is elected.

Not only is this fear misplaced, but it represents a deep misunderstanding of what has transpired in New York, the United States, and much of the developed world in the past two decades. The transformation of New York and a plethora of American cities into thriving and relatively affluent hubs in the past 20 years is not, as is widely believed, the product of astute mayors and innovative policing. Rather, cities have been transformed because their residents and industries have transformed them.

That is not the common story. In New York, the legend goes that Mayors Rudy Giuliani and Michael Bloomberg the city turned to the innovative policing of two-time commissioner Ray Kelly to end the deleterious waves of crime, reduce the red-tape, repair crumbling infrastructure and make the city hospitable to business and commerce.*

Undoubtedly, New York became a vastly safer place over the past 20 years, with violent crime falling 75 percent since 1990. It also became a far more affluent place as the rise of Wall Street and high finance enriched the city’s coffers (though not as much as many believe, given how many of the winners of the finance sweepstakes do not live in New York City itself). The burgeoning of new media and startups during the Bloomberg years and the attraction of the city as a hub for entrepreneurs in Brooklyn and Lower Manhattan only cemented that process.

Yet how do we explain the fact that these trends occurred throughout the United States in city after city, when those cities had their own mayors, their own police chiefs, and none of which did the bidding of New York?

The common belief is that the drop in crime is due to astute policing, especially to the “broken windows” theory that pointed officers toward small crimes in the belief that preventing petty lawlessness would prevent more serious crime. That approach was embraced by Giuliani and by mayors around the country. Yet many criminologists doubt those claims, and question whether different policing had much to do with the stunning drop in crime throughout the United States over the past two decades.

Outside of New York, there have also been astute mayors in many cities during these years: John Hickenlooper in Denver, Thomas Menino in Boston, Gavin Newsom in San Francisco, Wil Wynn in Austin, Shirley Franklin in Atlanta, and Richard M. Daley in Chicago. All of those cities and many more witnessed similar drops in crime along with a substantial revival in economic activity, a revitalization of decrepit neighborhoods, and an improvement in city finances and infrastructure.

You would be hard pressed to find too many commonalities in these mayors. Some adopted similar policies, but so did mayors in cities that did not fare so well, like Rochester, New York or Wichita, Kansas. Other cities also boomed in these yeas — Tulsa, Omaha, Houston, all of which benefited immeasurably from the rise of select commodities such as oil and gas in Houston and Tulsa and grain in Nebraska.

The only commonality is the influx of the same middle and professional classes that had fled many urban areas in the late 1960s and 1970s. While mayors may — may — have helped draw those classes back, it was that migration that sparked urban revival.

This influx then triggered a surge in income and the flowering of local industry or industries, notably a next wave of finance in New York and high-tech in San Francisco. Anchored by a vibrant industry, cities then attract what some have called “the knowledge class,” who increasingly propel a post-industrial America. That influx then triggered a series of cultural changes that saw sharp drops in crime and substantial improvement in the quality of life. Each city had its own specific story, its own cast of characters, but because it happened in so many places simultaneously, it is difficult to convincingly argue that these shifts happened because of who was mayor or police chief.

It is also true that the cities that have declined and gone in the opposite direction saw a continued flight of the professional classes and were often ill-served by their elected local officials. Detroit is of course Exhibit A, but even with a better local government, Detroit would have been hard pressed to stave off the immense pressure caused by the rapid changes in the auto industry, which had been the region’s lifeblood.

So the fear surrounding a de Blasio administration would appear to be excessive, stoked as it is by an incorrect reading of the past two decades. With his promises of higher taxes on the wealthy to pay for universal pre-K education and his rhetoric of a more equitable distribution of rewards and services to all the city’s residents rather than the elite who have thrived enormously, de Blasio has certainly tweaked the comfortable classes. But their lives — and the city — have improved over the past decades less because of what its mayors and police have done than because what millions of people have brought about by the energy and dynamism that they pour into their communities.

The revival of cities is a product of their industry, and the best evidence of that is that it’s happened across the country, in cities that rely on different industries and different people and different administrators. Of course, it’s better to have a good mayor, a competent police force, and a responsive government that represents all residents and not just the elite. But the future of cities will lie with its people and with the mysterious forces of affluence and drive and creativity that define healthy cities. There is little sign of that abating, and that force — thankfully — is more powerful than any mayor ever could be.

*CORRECTION Oct. 28: This piece originally implied that Rudy Giuliani appointed Ray Kelly as police chief. He did not.

PHOTO: Democratic New York City mayoral candidate Bill de Blasio (L) is greeted by supporters during the New York State Nurses Association rally outside City Hall in New York October 17, 2013. REUTERS/Brendan McDermid