A few hours after the Manhattan district attorney announced he would not prosecute some of the protesters who had been arrested during demonstrations against police brutality, the Police Department sent him a message: All the officers assigned to his office would be pulled off the job to help with crowd control.

The district attorneys in the Bronx, Brooklyn and Queens made similar decisions and received the same news.

Police Commissioner Dermot F. Shea said on Friday that the timing was unrelated to the prosecutors’ decisions. Resources were pulled from the entire department to cover the protests, he said.

But to some in the prosecutors’ offices, the episode was emblematic of a growing divide between the police and most of the city’s district attorneys over how to address public outrage about racial disparities that pervade the criminal justice system.