Mayor Bill de Blasio took a victory lap at the Brooklyn Museum Wednesday, announcing good news on the crime front: a 4 percent reduction in reported crimes in 2016 compared with the year before, and the fewest reported shootings in the modern era.

The numbers come at a good time for de Blasio in a campaign year. In his first run, he made the case that aggressive stop-and-frisk policing could decline along with crime. That began before his administration and has held true, a happy trend of increased safety over 20 years.

The question is, how did it happen?

De Blasio contended Wednesday that the great decrease began with the data stringency of the NYPD’s CompStat, and continues today with precision policing — focusing resources on particular hot spots — and neighborhood policing, which aims to get communities more acquainted with police officers and vice versa. He and new Commissioner James O’Neill expressed their continued support for quality-of-life policing, which focuses on low-level crimes. O’Neill’s predecessor, William Bratton, was closely identified with the practice. De Blasio said such policing has changed: He pointed to a 20% drop in arrests over the last three years and City Council summons reform.

Some advocates for criminal justice reform, however, see quality-of-life policing as an onerous and prejudicial strategy that isn’t definitively tied to drops in crime. They note that more community outreach hasn’t tracked with more accountability. Despite de Blasio touting more leniency on marijuana and fewer low-level arrests related to the drug in 2014, such arrests increased in the first nine months of 2016 compared with the same period in 2015, according to state data. And those arrested were overwhelmingly minorities.

Other factors certainly contributed to the decline in crime since the peak years of 2,000 murders — a rising economy and the end of the crack era, for example.

No matter where full credit is apportioned, however, the numbers show that so far de Blasio and his NYPD have successfully stewarded the city’s safety.