NEW YORK (CBSNewYork) — NYPD Commissioner Bill Bratton said police officers are feeling the strain of their jobs following the shooting that left five officers dead in Dallas.

Bratton told CBS’ “Face the Nation” on Sunday that “this is a time of great pressure on our officers.”

“There’s always pressure on American police officers, danger,” Bratton said. “But good news is that American police, the American police profession is a strong profession that has been going through profound changes over the last 20 years. Constant improvement in their training. Constant improvement in use of force.”

Bratton said he was surprised about the Dallas police shooting.

“Did we see it coming? No,” he told “Face the Nation.” “But in policing, you always plan for the worst, hope for the best. Dallas was beyond anybody’s ability to speculate about or even think about.”

Army veteran Micah Johnson opened fire on Dallas police during a protest of the fatal police shootings involving two black men.

Bratton said having officers come from the community they police helps to ease tensions.

“We don’t bring them in from Mars. They come from the communities they police,” Bratton explained to “Face the Nation.” “And over the years increasingly we’ve had much more diversity in policing, Muslim officers, increasing number of African-American officers, Latino officers. And that’s a good thing because the community wants to see that and that’s part of the way we bridge the divide that currently exists between police and community.”

Homeland Security Secretary Jeh Johnson, who appeared with Bratton, said “effective community policing” is the best way to find a balance between protecting people and personal freedoms.

“The balance is best struck when you have effective community policing – where the law enforcement officer, the peace officer, is regarded as a friend in a lot of neighborhoods,” Johnson said. “See a lot of that happening here in New York City, I’ve seen that in other cities as well.”