A Harris County Sheriff’s Office deputy faces a criminal charge for allegedly having sex with a woman in custody last year, according to court documents.

Tony Richards, 48, has been indicted for improper sexual activity with a person in custody, according to court records filed with the Harris County District’s Attorney Office. Richards is accused of having sex with a woman in custody on Nov. 1, according to court records.

Richards, a former senior deputy, was fired from the sheriff’s office on Wednesday. He scheduled to appear before a jury next week, said Donna Hawkins, a spokeswoman for district attorney office.

“While policing our own, we became aware of Mr. Richards’ behavior and immediately turned the findings over to the Harris County District Attorney,” said Deputy Thomas Gilliland, a spokesman.