Black and Hispanic defendants are more likely to be held in jail before trial and more likely to be offered plea bargains that include a prison sentence than whites and Asians charged with the same crimes, according to a two-year study of prosecutions handled by the Manhattan district attorney’s office.

The study, by the Vera Institute of Justice, found that race was a significant factor at nearly every stage of criminal prosecutions in Manhattan, from setting bail to negotiating a plea deal to sentencing.

But race was not the sole factor, the study’s authors said. A number of legal considerations were found to be more important in predicting a defendant’s fate, among them the seriousness of the charge and the defendant’s arrest record.

Nicholas Turner, the president of the institute, said researchers could not determine what caused the unequal treatment. “It could be implicit bias,” he said. “It could also be race-neutral policies that end up having a particular disparate effect.”