Rudy Giuliani said Friday that the reason many black children are alive today due to law enforcement and that the real “danger” is another “black kid who is going to shoot you on the street.”

In an interview with Brian Williams on “MSNBC Live,” in the wake of five police officers being killed and seven more being injured in Dallas, Texas Thursday, Giuliani said, “A confrontation with police is an inherently dangerous situation whether you’re white or black.” (RELATED: Police: Dallas Suspect ‘Upset About Black Lives Matter,’ ‘Wanted To Kill White People’)

[dcquiz] “If you resist, a police officer is immediately going to become concerned for his own life,” Giuliani said. “And the reality is that doesn’t matter if you’re white or black. If a police officer says to me, ‘Put your hands up’ and I try to run away, I try to lung at them, I try to grab him, I don’t care if white or black that gun is going to come out.” (RELATED: Police: Dallas Suspect ‘Upset About Black Lives Matter,’ ‘Wanted To Kill White People’)

“We have to teach young people that. My father taught me that. When a police officer tells you something, do what he says,” Giuliani said. “It doesn’t matter if you’re white or black.”

“I do not believe that our police are basically racist. I do believe they are put in contact with the black community particularly in urban America, not in the rest of America, in urban America much more often than they are with the white community. They haven’t chosen that,” he said. “Seven out of 10 of the people murdered in New York City last year were black. 75 percent of the murderers that were convicted are black. So when the police get calls, where do they get calls to seven out of 10 times? The black community.”

“One of the ways to deal with this is as a whole, let’s teach our police if there’s any remaining racism, let’s get rid of it. Let’s prosecute the bad ones that are guilty beyond a reasonable doubt,” Giuliani said. “Let’s teach everyone including the children of the black community that most of those police officers are the reason you’re alive because the real danger to you is that black kid who is going to shoot you on the street because that happens many, many more times than police officers.”

Follow Steve on Twitter and Facebook