A Kansas judge has come under fire for saying in court that two girls--solicited by an online predator to have sex with him when they were 13 and 14--were partly to blame for what happened to them.

“I do find that the victims in this case, in particular, were more an aggressor than a participant in the criminal conduct,” Leavenworth County Judge Michael Gibbens said in remarks delivered at a December sentencing for a 67-year-old man who paid for sex with the two girls, according to a report in the Kansas City Star.

The Star reported on Sunday that Gibbens ignored prosecutors in sentencing Raymond Soden to nearly six years in prison. Prosecutors said Soden had a prior conviction for battery and sexual battery and had asked that he be sentenced to more than 13 years in prison.

TEXAS TEACHER TRIED TO TRAFFIC UNDERAGE RELATIVE FOR SEX TO MEN IN MOROCCO, COPS SAY

The paper reported that Gibbens explained his reasoning for the more lenient sentence by saying that the two girls went to Soden’s house voluntarily and took money from him for sexual favors.

“They were certainly selling things monetarily that it’s against the law for even an adult to sell,” he said, according to the paper, which obtained a transcript of the sentencing.

Neither girl showed up for the sentencing. That also swayed the judge’s sentence, the paper reported.

A child advocate in Shawnee, Kan., told the paper that the two girls were minors and victims, not the aggressors.

CALIFORNIA TO HONOR ADVOCATE FOR VICTIMS OF 'SEXUAL SLAVERY' DURING WORLD WAR II, WHO DIED THIS WEEK AT AGE 93

“Sexual assault is never the victim’s fault. It doesn’t matter what the girls did or didn’t do, he is still the adult and nobody deserves to be taken advantage of sexually,” Michelle Herman said, according to the paper.

In August, Soden pleaded no contest to a charge of electronic solicitation, a felony. He admitted knowing the younger girl was 13.

CLICK HERE TO GET THE FOX NEWS APP

Leavenworth County government lists a phone number for Gibbens on its website. A message left at the number by Fox News on Monday was not immediately returned.