Charles Barkley says black people have 'got to do better' in response to last week's shootings of black men by police and the sniper attack that left five officers dead in Dallas.

In an interview on ESPN radio's Dan Le Batard show Tuesday, Barkley said that police 'have made some mistakes' but 'that don't give us the right to riot and shoot cops.'

He continued that it bothers him that black people 'never get mad when black people kill each other. We never get mad when black people kill each other, which has always bothered me.'

Scroll down for video

Charles Barkley told ESPN radio on July 12 that black people have 'got to do better' in response to last week¿s shootings of black men by police and a sniper attack that left five officers dead in Dallas.(AP Photo/John Locher, File)

'I’ve always said if we as black people want more respect, we have to give each other respect. You can’t demand respect from white people and the cops if you don’t respect each other.

He added that 'there's a lot of blame to go around but I’m not going to get on TV and yell like all these other idiots.'

The 11-time NBA all-star and TNT commentator has often been outspoken on issues of race.

'I'm not perfect. I'm not trying to be perfect. But you have to ask yourself, "Are you part of the problem or are you part of the solution?"

He added, 'I think some of these cops are panicking under pressure.'

Host Dan Le Batard did not agree with many of Barkley's opinions, causing flare-up during the interview

Barkley's comments hit nerve with the radio host, who pointed out that police are more likely to panic around black men than other races.

Barkley responded, saying he didn't think racial profiling was right but that he could see why white officers stereotype black people because 'some are crooks'.

'There is some reason why there's racial stereotypes because some of those black people out there are committing crimes. Let's don't sit there and act like all our hands are clean,' Barkley said.

As for Barkley's claims that black people don't get mad when black people kill each other, Le Batard said 'that's not true'.

'We don't nearly have as much outrage as when a white cop kills somebody,' Barkley shot back, after calling Le Batard out for not being black himself.

'Dan, I've been black all my life, most black people I know are killed by other black people.'

Barkley went on to say that the officers in both the recent shootings of Alton Sterling and Philando Castile 'clearly overreacted' but says he can sympathize with the pressure of their job.

'There's no doubt in my mind if I'm fighting with a guy and I hear somebody scream gun, and I got a gun, I'm going to shoot the guy,' Barkley said.

While he thinks several cops have made mistakes in the killings of black men, the black community is going to need to work with law enforcement in order to make change.