WASHINGTON — Sixty-six percent of states that elect prosecutors have no blacks in those offices, a new study has found, highlighting the lack of diversity in the ranks of those entrusted to bring criminal charges and negotiate prison sentences.

About 95 percent of the 2,437 elected state and local prosecutors across the country in 2014 were white, and 79 percent were white men, according to the study, which was to be released on Tuesday by the San-Francisco-based Women Donors Network. By comparison, white men make up 31 percent of the population of the United States.

The numbers are being released as debate continues about racial imbalances in the criminal justice system in the wake of police-related deaths in Ferguson, Mo.; Staten Island; and Baltimore.

While the racial makeup of police forces across the country has been carefully documented, the diversity of prosecutors, who many law enforcement experts say exercise more influence over the legal system, has received little scrutiny. Prosecutors decide in most criminal cases whether to bring charges. And, because so many criminal cases end in plea bargains, they have a direct hand in deciding how long defendants spend behind bars.