Attempted murder, the police officer told me. That would be the charge if the two men were caught. “We probably won’t catch them,” he admitted, “but if we do, that’s what we’ll put on them.” I was surprised; it was, I said, more a mugging than anything else. “Did they have a gun?” he asked. Yes. “Did they say they were going to use it on you?” Yes. “That’s textbook attempted murder.”

This all happened two decades ago, but of course I remember every detail, in part because the officer’s words made me realize the gravity of the situation. Getting mugged was no big deal in West Philly in 1997, but the possibility that I could have lost my life over $24—that was something else.

A brief recap: I was a graduate student at the University of Pennsylvania, living a few blocks west of the school. On the evening in question, I was walking down Spruce Street toward campus, thinking about anything but my walk. My uncle had died the night before, and I was on my way to return an overdue book—The Raw And The Cooked, by Claude Levi-Strauss—to the library before I headed to New York the next morning for the funeral. For once, I let my guard down.

At 42nd Street, I heard footsteps crunching in the heavy snow. I turned halfway around before I was hit with a forearm shiver. I went down hard—I remember hearing the knee of my jeans tear out on the curb as I hit the ground. Two men were on top of me immediately, one clouting me in the head, the other straddling my back, jamming a pistol against my ribs, demanding my wallet. “How much do you have, how much is in there?” Only 20 dollars or so, I guessed. “Then you’re going to die tonight,” the fellow with the gun told me.

America’s urban centers are now often safer than their suburban or exurban satellites.

Once they got the cash, they were gone; they even threw my wallet back at me as they ran (something I was pathetically grateful for at the time). The cops tried mightily in the aftermath to help me identify suspects, but in the end I just became another bump in a shocking statistic: unsolved violent crimes in Philadelphia in 1997.

Stories and experiences like this can make people fear urban centers in the United States, and in the 1990s they were common enough. They also explain why politicians like President Donald J. Trump can get such political traction out of depicting our cities as urban badlands. Just last month, Mr. Trump said: “Here in Philadelphia, murder has been steady—I mean—just terribly increasing.”

But this is not true, in Philadelphia or elsewhere. Almost all major cities in the United States have experienced major decreases in violent crime over the past 25 years. In 1996 and 1997, when I lived in Philadelphia, the city suffered over 400 murders a year; last year there were only 277. Overall reported crime in the city is at a three-decade low. The Wall Street Journal recently reported that New York City experienced its lowest recorded level of major crimes ever in 2016. Across the nation, the rates of violent crime are down 28 percent from their 1990s high. In urban centers, the rates of violent crime are down almost twice that rate.

While Rudolph Giuliani and others will claim this drop is because we “got tough on crime” in the 1990s and 2000s, that self-serving claim does not hold true in other cities. Longtime Philadelphia residents will remember Frank Rizzo, the legendary police commissioner (and later mayor) who used to wear a billy club in his cummerbund at formal events. There is a statue of him outside the Municipal Services Building; there is a huge mural of him in South Philadelphia. Except the famous Rizzo, notorious for his hardline approach, presided over decades of insane violence in the city. Only under his more nuanced successors did Philly experience huge drops in crime.

The reality is that America’s urban centers are now often safer than their suburban or exurban satellites. While sometimes this is the result of painful gentrification, that is not the only reason. Often the combination of jobs, cops, stores, transportation alternatives, affordable housing and community institutions offered by our cities cannot be matched in the suburbs, and those realities all add up to safer neighborhoods. Just ask Jane Jacobs.

It is troubling, then, to consider the intent of statements like “Inner-city crime is reaching record levels” (also Mr. Trump; also false). Are they off-the-cuff remarks? Important clarion calls to rally public and private institutions to help beleaguered neighborhoods that deserve better? Or are they meant to inspire fear of our cities and disgust for their residents?

To put it another way: Are we being encouraged to fix our cities, or to flee them?

James T. Keane is a Senior Editor at America.