President Trump has claimed that “a radical movement to defund, dismantle and dissolve our police departments . . . has led to a shocking explosion of shootings, killings, murders and heinous crimes of violence.” He’s pushed this message all summer, hoping to tie his Democratic challenger, former vice president Joe Biden, to chaos in the streets.

Trump is correct that violent crime has risen in many American cities. But calls to defund the police are not the reason.

The spike is related in complex ways to both the coronavirus pandemic and social unrest over police violence. Very few cities have actually moved to reduce police budgets at all: Out of about 18,000 law enforcement agencies nationwide, only a dozen or so — including New York, San Francisco, Seattle and Austin — had cut their police budgets by mid-August. More cuts are sure to come, but the looming reductions in policing and other city services are much more likely to result from revenue shortfalls caused by the coronavirus than from the demands of protesters.

And while violent crime has increased during the pandemic, property crime rates have been falling, which indicates that different factors are responsible for these contrasting crime changes. A recent study I conducted with Ernesto Lopez of crime rates in over 20 cities this year found that residential burglary and larceny rates fell sharply from the beginning of March to the end of June, when our study ended, even though property crimes tend to increase as the weather warms during the spring and summer. Those declines are almost certainly related to quarantines and business closings caused by the pandemic: Burglars tend to avoid occupied households, and there is no shoplifting when the shops are closed.

Meanwhile, homicide and serious assault rates in the cities we examined increased through the end of June. But the increases in violence did not begin in most cities until late May and early June. Homicide rates rose by 37 percent during that five-week period. Assault rates went up 35 percent. Those spikes were significantly greater than the increases in the same crimes during the same period last year.

The upturn in homicides and serious assaults began shortly after George Floyd was killed in Minneapolis and mass protests against police violence spread through the nation. The pandemic probably contributed to the increase in violence by reducing police presence and contact with the public, especially in crime hot spots where the violence is concentrated. A study conducted this spring by the International Association of Chiefs of Police and researchers from George Mason University found large declines in proactive traffic and pedestrian stops and community policing activities in a sample of nearly 1,000 police departments.

But social distancing by the police cannot be the only cause of the rise in violent crime. If it were, property crimes would have risen as well, or the pandemic-related drops in property crime would not have been as large. During periods of widespread social unrest, especially over police brutality, violent crimes tend to increase. We saw this during the urban unrest of the 1960s and again five years ago amid the protests against police violence in Ferguson, Mo., Chicago, New York and elsewhere. When tensions flare between the police and the communities they serve — especially disadvantaged communities of color — “police legitimacy” suffers. And if trust and confidence in the police fall far enough, street justice replaces law enforcement, and rates of violence increase.

Deteriorating police legitimacy is not Trump’s explanation for the rise in violence, though. He argues that Democrats simply don’t know how to control violent crime, or that police departments have been held back or frightened by the protests. His view is reminiscent of the “de-policing” claims — the so-called Ferguson Effect — of five years ago. The idea then and now is that the police will refuse to fully engage in crime fighting when they are criticized.

De-policing may be occurring to some degree in some places today, but it did not explain the homicide rise after Ferguson. Joel Wallman and I studied homicide rates in over 50 big cities and found that declining arrest rates for minor crimes — a measure of de-policing — were unrelated to homicides. More arrests did not mean fewer homicides in any of the cities we studied from 2010 to 2015. And again, if reduced police activity were the main reason violent crime has increased this summer, property crime rates would also be increasing, not declining.

Trump’s remarks must be taken seriously, however — not because they are an accurate depiction of reality, but because they can encourage self-appointed armed militias to fill the perceived void in formal law enforcement. That can have disastrous results, as we saw in Portland, Ore., and Kenosha, Wis. And combating the current rise in violence in our cities will require more than dispelling politically motivated myths about a war on police.

The first step to bring violent crime under control and restore police activity to normal levels is subduing the pandemic. Until that happens, Congress should step in to provide municipalities with the funds needed to offset revenue losses caused by the coronavirus. Those funds could augment police budgets where needed, but also support the social services and community investments that protesters rightly argue are necessary to reduce crime.

But the second front in reducing crime is police reform, which would help restore confidence in the legitimacy of law enforcement agencies nationwide. The Black Lives Matter movement has shined a bright light on police violence. The urgent task now is to convert protest ideals into workable public policy. That effort in turn will require more effective mechanisms, both inside and outside police departments, to hold officers accountable for violations of their training, agency policy and criminal law.

These actions, taken together, are far more likely to be effective than the president’s laments about anti-police protesters and “Democrat mayors,” which only fan the flames of discontent and encourage vigilantism.