Former Washington Attorney General Rob McKenna is accused of violating ethics rules by disseminating pre-trial publicity in a Bellingham rape case.

A 37-year-old is accused of second degree child rape for an incident about two years ago, according to court documents. A then-13-year-old babysitter claims the defendant came home earlier than expected and raped her on an upstairs couch.

McKenna made statements to KGMI Radio about the defendant over the weekend of July 15, according to documents filed in Whatcom County Superior Court. McKenna was quoted as one of the defendant's lawyers, saying the defendant will be "vindicated."

"(Defendant) is innocent and will be exonerated," McKenna is quoted as telling KGMI radio. "On the advice of his attorneys, (defendant) took a polygraph exam and passed. Another reason he's innocent is the long period of time between the alleged incident and the accusation being made."

But Whatcom County Prosecuting Attorney Eric Richey said the defendant actually failed a polygraph test administered by the Whatcom County Sheriff's Office. The defendant took a private test "on the advice of his attorneys" that the defendant or defense team paid for, Richey wrote.

"Detectives from the sheriff's office are concerned about the private test's accuracy," Richey said.

Now Richey questions whether a fair trial can be heard in Whatcom County because of McKenna's pre-trial publicity.

McKenna didn't respond to a KING 5 email requesting comment.

A friend of the defendant's posted on KGMI's social media sites, saying the defendant is innocent and passed a polygraph test. Whatcom County said this also inhibits a fair trial.

After the incident in the fall of 2015, the suspect took the babysitter home, "acting like nothing happened" and told her "If you tell anyone about this you'll regret it," according to court documents.

The girl told her boyfriend about the incident and later told her stepmom. The state took legal action earlier this month because of the crime, defendant's threat, "and her parent's fear of retaliation."

A hearing is scheduled for Thursday to consider the pre-trial publicity claim.