A former New Jersey police chief who is being tried on federal hate-crime assault charges used racial slurs, compared blacks to “ISIS” and said President Trump “is the last hope for white people,” according to reports.

“I’m telling you, you know what, Donald Trump is the last hope for white people, ’cause Hillary will give it to all the minorities to get a vote,” former Bordentown Police Chief Frank Nucera said, according to NJ.com, which cited a transcript displayed at trial in Camden federal court this week.

“That’s the truth! I’m telling you,” he added.

The star prosecution witness, Sgt. Nathan Roohr, a K-9 officer, testified that Nucera grabbed the head of a handcuffed black suspect “like a basketball” and slammed it into a metal doorjamb at a hotel.

The impact “made a loud thud,” Roohr said, according to the Philadelphia Inquirer.

“I immediately knew it was wrong. I knew I had an obligation to report it. This was an obvious excessive force,” he added about the attack on the Trenton teen, who had not paid a bill at the Ramada on Route 206.

Nucera also is charged with civil rights violations and lying to the FBI in the Sept. 1, 2016, incident, which prosecutors say involved excessive force and was racially motivated. He resigned in February 2017.

Authorities say Nucera made racist remarks back at the police station that were secretly recorded by Roohr and played for the jury.

One snippet captured Nucera saying: “I’ll tell you what, it’s gonna get to the point where I could shoot one of these [expletives].”

Roohr, who said Nucera’s racist remarks actually began several years earlier, read from a note he said he wrote after the then-chief spewed the N-word.

He said Nucera was upset after the tires on a patrol car were slashed by a person who the chief suspected was black.

“These [N-word] are like ISIS, they have no value. They should line them all up and mow ’em down. I’d like to be on the firing line, I could do it,” Roohr quoted Nucera as saying.

During his explosive testimony, the 16-year veteran did not make eye contact with his former boss at the defense table.

The case is unusual because Roohr broke the so-called “blue wall of silence,” according to experts cited by the Inquirer.

His identity had been kept secret by prosecutors in their criminal complaint in October 2017, but it was eventually revealed in court documents filed by the defense.

Under cross-examination by defense attorney Rocco Cipparone, Roohr did not offer race as a possible motive.

He told a jury of seven women and five men: “I don’t know why he did it.”

Cipparone, who has questioned Roohr’s motives in recording Nucera, suggested that there was a concerted effort to get his client off the force by cops dissatisfied with his overtime policies and disciplinary measures.

The ex-chief also used police dogs to regularly “intimidate” African Americans — even bringing the dogs to high school basketball games and positioning the animals at the entrance of the gym while the department was providing security, according to the feds.

On April 30, 2016, he was recorded on audio directing another officer to walk a police dog through an apartment complex to “let these f—king m–lies see him. Let ‘em see him. I don’t care,” according to the complaint.