The New York City police commissioner, William J. Bratton, on Tuesday delivered a broad commentary on the country’s troubled history of race relations and the role of the police in fostering old divisions that still sow distrust in minority communities.
In a 26-minute address that touched on slavery, Peter Stuyvesant and the fatal police shooting of a black teenager in 1964, Mr. Bratton told the story of racial tension through the prism of the police and the “vile” legacy of racism that once sat on a foundation of law and order. “Many of the worst parts of black history would have been impossible without police,” he said.
Mr. Bratton, during his address in a crowded church basement in Jamaica, Queens, also addressed the kinds of latent racial biases that may still affect officers and that formed the centerpiece of a striking speech this month by the director of the Federal Bureau of Investigation, James B. Comey.
When officers see “the same young men in the same neighborhoods committing almost all of this city’s violence,” Mr. Bratton said, it “carries a risk of turning into bias.”
He added: “We need to fight against that.”
The two speeches, by two of the most prominent figures in policing, highlighted a national effort on the part of law enforcement leaders to turn a corner after months of tension and protest that flared last year over the deaths of two unarmed black men in Ferguson, Mo., and on Staten Island.
Mr. Comey, in his address, cited the song “Everyone’s a Little Bit Racist” from the Broadway musical “Avenue Q” and acknowledged that police officers were not immune to bias. He said officers, regardless of their race, viewed white and black men differently.
Mr. Bratton, for his part, said on Tuesday that while the country and the city were founded on systems of slavery and racism, those unjust systems, which included the police, had since given way to problematic individuals.
“I do not deny that it exists,” Mr. Bratton said, speaking of cruelty and injustice by officers. “But it is not systemic in the sense that we do not condone it.”
“It is a matter of the actions of the few,” he added, “and the few that we need to seek to find and get rid of. And the few that we need to keep out of the ranks of the N.Y.P.D.”
At times, Mr. Bratton appeared to build on Mr. Comey’s discussion of “hard truths,” saying the New York Police Department needed to face its own hard truth: that in minority neighborhoods where crime is high, “we have a problem with citizen satisfaction.”
“We’re often abrupt, sometimes rude, and that’s unacceptable,” he said. “But our critics need to face the hard truth that they misrepresent us sometimes.”
Mr. Bratton reiterated the need, also expressed in his eulogy for Rafael Ramos, one of two officers killed together in December, for the police and protesters to “see each other.”
The speech on Tuesday, part of a Black History Month event, received a warm reception from the mostly black audience, including former Gov. David A. Paterson, in the Greater Allen A.M.E. Church of New York. At the end, many stood to applaud.
Some advocates who have called for a wholesale reform of Mr. Bratton’s “broken windows” policing strategy, in which officers focus on minor offenses to prevent major crimes, embraced the long view offered by Mr. Bratton. But they challenged the notion that the problems were no longer systemic.
“Commissioner Bratton is in the position of authority now to address current problems of discriminatory policing in New York City,” Priscilla Gonzalez, a spokeswoman for Communities United for Police Reform, said. “Unless he takes action, he, too, will be judged poorly by history.”
A version of this article appears in print on February 25, 2015, on page A19 of the New York edition with the headline: Police Commissioner, Speaking on Racism in America, Says Officers Must Fight It. Order Reprints| Today's Paper|Subscribe