If Bill de Blasio wants his mayoralty to succeed, he must find a way to get the NYPD under control. At the moment the department is seething -- and the mayor looks like he could get trapped among warring factions.

The latest round of hostilities began when NYPD Chief of Department Philip Banks resigned last week rather than take a promotion. Banks' motives remain opaque -- but rumors are suddenly swirling at tornado speed.

Among the choicest: Commissioner William Bratton tried to kick Banks upstairs but Banks refused. Chirlane McCray, the mayor's wife, is furious that Bratton let Banks walk. De Blasio and Bratton are at war with each other.

The air got so thick over the weekend that de Blasio called a news conference to say he and Bratton are just fine with each other. We hope that's true.

Because if the mayor really wants to reform the NYPD and make it more responsive to community concerns, he must allay the fears of his doubters as well as his friends -- and more than a few of his doubters are cops.

Bratton can help de Blasio bring those doubters around. But de Blasio needs to stop putting his commissioner on the spot with a rank-and-file force they both need.

The root of the conflict is de Blasio's correct belief that some minority groups deserve a greater voice in how they are policed. In a city that's 33 percent white, 26 percent black and 26 percent Hispanic, this is common sense.

But de Blasio hurts Bratton's credibility with the troops when he publicly seats the commissioner on one side of himself and the Rev. Al Sharpton on the other at a major event. Sharpton has done more than his share of cop-baiting over the decades. Not everyone has forgotten.

The mayor must also fight off Bratton detractors who want to see the "broken-windows" concept die. Many in this group are de Blasio's loyal supporters. The trouble is, broken-windows works: Tough policing of small crimes can keep larger crimes from happening. It needs to stay.

De Blasio and Bratton must work together to quell the rumors and unrest so they get on with changing the NYPD for the better. They cannot afford to lose this one.