Bill Bratton is the face and voice of New York City’s police department and among the best-known figures in policing across the country.

He’s become synonymous with a safer city, where serious crimes are at historic lows, and with key innovations like CompStat, the crime-tracking system he instituted during his first stint as police commissioner in the 1990s.

He was the right commissioner for a tough job.

Amid the racial tensions between the NYPD and minority communities, however, Bratton is the enemy because of his broken-windows strategy to deal with quality-of-life crimes, his sharp criticism of the Black Lives Matter movement, and his unwavering support of the NYPD amid calls for broader reforms.

Bratton had said he wouldn’t stay on after 2017, so his unexpected announcement yesterday that he would leave next month was surprising. A day earlier, protesters had gathered in City Hall Park, where they demanded, among other things, Bratton’s firing as well as the defunding of the police department. Now BLM activists and other critics are declaring victory, chanting a taunting goodbye as Bratton left City Hall after the news conference with Mayor Bill de Blasio.

De Blasio insisted the protests, along with the ongoing federal investigation into police corruption, “110 percent had nothing to do with this.” Bratton, 68, said he told de Blasio on July 8 that he would be accepting a private-sector job, but no details were given yesterday.

advertisement | advertise on newsday

The mayor promoted Chief of Department James O’Neill to the top job and much of Bratton’s team is remaining, signaling that the department would continue its current policies and practices. In fact, they made a show of giving themselves a pat on the back, applauding one another for “extraordinary” accomplishments and teamwork.

And they were right, mostly. The city is a much safer, better place — far different from when Bratton first arrived in 1994 under then-Mayor Rudy Giuliani.

In his first term, de Blasio has given the NYPD what it wanted, from new cops and equipment to more money, and the department has made strides in counterterrorism, technology and more. But the liberal mayor was never seen by the rank and file as someone who had officers’ backs.

Bratton was his shield.

Yet, de Blasio, and now O’Neill, must acknowledge the tremendous anger in the city over police-involved shooting deaths of black men across the country. Two years after the “choke-hold” death of Eric Garner in Staten Island, the NYPD hasn’t healed the poor relations between officers and minority communities.

This is a critical moment for the mayor as he seeks a second term. Bratton’s departure defuses the critics camped on de Blasio’s doorstep. And choosing O’Neill reassures others that the change in the top cop won’t change the city’s commitment to quality-of-life policing. That’s good, it’s a strategy that has worked.

O’Neill is credited with starting neighborhood policing, which de Blasio says will make a “huge difference” in police-community relations. But for O’Neill to orchestrate the difficult balance of maintaining safe streets while showing a willingness to listen and change, he will need a mayor who has his back. — The editorial board