A Tennessee judge apologized Thursday for allegedly talking about working like a "regular white man" during a discussion to schedule a hearing for a black defendant.

Audio inside the Wilson County courtroom recorded Judge Haywood Barry allegedly making the remark while speaking with an attorney, The Tennessean reported.

"I'm not working second shift. I'm going to work like a regular white man, as they used to say. ... I'm not going to be a slave," Barry said, according to the audio recording obtained by the newspaper. "Don't allow that any more. Don't allow that any more."

Barry is currently serving an eight-year term as a General Sessions Division II judge. His term expires in 2022.

In an interview with the newspaper, he regretted making the comment.

"It was probably a very inappropriate statement," Barry said. "I'm sorry I made it. I'm ashamed of the fact that something like that would even come out of my brain."

The state code of judicial code of conduct prohibits judges from engaging "in the performance of judicial duties, by words or conduct manifest bias or prejudice, or engage in harassment, including but not limited to bias, prejudice, or harassment based upon race."

CLICK HERE FOR THE FOX NEWS APP

Lebanon defense attorney Jeff Cherry said Barry's comments are not "indicative of who he is."

“I have seen him stand up for what is right constitutionally over and over again without regard to race, religion or socio-economic status," Cherry said. “I have seen him make decisions based on applying all his years of experience to the facts and Constitution."