A Texas sheriff slammed Rep. Beto O'Rourke (D-Texas) for making critical statements about law enforcement's treatment of African-Americans.

O'Rourke, who is challenging Sen. Ted Cruz (R-Texas) in one of this year's most closely-watched Senate races, made the comments during a town hall Wednesday while discussing criminal justice reform.

O'Rourke began by talking about the historical injustices African-Americans have faced, including law enforcement colluding with prisons and local employers to arrest African-Americans for petty crimes so they could force them to work on a chain gang.

“That injustice ... continues to persist today,” O’Rourke said. “That system of suspecting somebody solely based on the color of their skin, searching that person solely based on the color of their skin, stopping that person solely based on the color of their skin, shooting that person solely based on the color of their skin, throwing the book at that person and letting them rot behind bars solely based on the color of their skin, is why some have called this — I think it is an apt description — the new Jim Crow.”

O'Rourke's campaign has said he was in no way referring to the police, but Denton County Sheriff Tracy Murphree isn't buying it.

Dershowitz: 'Disturbing' to Say Kavanaugh Accuser Should Be Believed Without Due Process

'I've Always Been a Hugger': NC Boy Describes Viral Hug With President Trump

"His rhetoric is divisive, it's insulting and most of all it's dangerous," Murphree said.

He said there has been a war on a police officers for several years, and it's troubling to see a lawmaker as prominent as O'Rourke seemingly side against law enforcement.

"It makes it dangerous for citizens and police officers. A lot of people listen to what he has to say. When he speaks, people take that to heart," Murphree said, calling O'Rourke's remarks "insulting to me as a citizen of this state and as a police officer."

As for the O'Rourke campaign's claim that he wasn't criticizing police, Murphree said the candidate's point is crystal clear and "it's just offensive."

Trump on Kavanaugh: Let Accuser Have Her Say, But Dems 'Can't Delay Vote Any Longer'

'Children Talk This Way': Tucker Blasts Gillibrand's 'Circular Reasoning' on Kavanaugh