Robert Koenig knew he was taking a risk when he sent a picture of himself wearing a diaper to a girl he thought was 17.

But the Abbotsford man thought the greatest consequence might be rejection — not jail time.

The girl on the other end of the social media platform turned out to be 12.

And their correspondence would have placed Koenig behind bars, but for the decision of a provincial court judge who found the mandatory jailing of the young man would be unjust.

"This court lacks the authority to strike down the mandatory minimum sentences for these offences, but it can refuse to apply them." Judge Kenneth Skilnick wrote in a decision earlier this month.

"And that is what is going to happen in this case."

'That's really hot'

Skilnick's decision to give Koenig a six-month conditional sentence highlights the problems inherent in applying a one-size-fits-all approach to punishment — especially when it comes to online crimes involving victims and perpetrators who deliberately lie about themselves.

Koenig pleaded guilty to making sexually explicit material available to a person under the age of 18 and to an offence usually referred to as "child luring" — a label Skilnick said would be misleading given the circumstances of the case.

Robert Koenig began conversing with the victim through a social media channel while he was on a European vacation with his parents. (CBC)

The relationship began in August 2014 while Koenig was on a European holiday with his parents.

They saw the sights during the day, but at night, the then-22-year-old explored the darker corners of the internet through a social media application called 'Whisper'.

Koenig received a message that read "I always feel very embarrassed because I am bigger than other girls.

He initially responded with innocent banter.

"But then the accused disclosed his 'secret', which concerned a particular fetish of his. The complainant was curious about this, at first telling the accused that she was not judging him or his fetish," Skilnick wrote.

"The accused sent a picture of himself wearing a diaper, with a soother in his mouth, and the complainant responded with the message 'that's nothing to be ashamed of, that's really hot.'"

'Honest belief that the complainant was 17'

In the coming days, Koenig sent graphic photos and videos of himself.

The girl, who lives in the southwestern U.S., also sent pictures, but Skilnick said her age was not apparent from the images.

She told Koenig she was in Grade 11. She also talked about sex in a way the judge said a person might not reasonably expect from a 12-year-old.

The judge who sentenced Robert Koenig could not strike down the mandatory minimum so he refused to apply it instead. (David Horemans/CBC)

Five days after the pair started communicating, the girl's father found the text messages. He alerted police who eventually traced the number to Abbotsford and Koenig.

Abbotsford police followed up with an investigation that led to the charge.

"(He) gave a ... statement to police in which he admitted to exchanging messages with the complainant," Skilnick wrote.

"He said that it was his honest belief that the complainant was 17 years of age, because that is what she told him, and also because he believed that Whisper's terms of service indicated that users should be at least 17 years of age."

An honest but mistaken belief that a victim was above the age of consent is not a defence.

Which meant that when Koenig pleaded guilty, the Crown sought the mandatory minimum sentence: 30 days for sending the images and 90 days concurrent for child luring.

'Did not start out looking for anyone'

Koenig's lawyer filed an application asking Skilnick to consider whether sending their client to jail would be a violation of his Charter rights.

The victim gave an impact statement in which said she feels sadness, guilt and rage. She called Koenig sick and twisted.

"Cases of this nature are especially difficult because no one ever wants to see a child experience what the complainant has experienced in this case," the judge wrote.

A psychologist concluded that Koenig's diaper fetish "is generally unrelated to pedophilia or sexual attraction to children.

"The accused has a desire to engage in a fetish which, when engaged between consenting adults is not illegal," Skilnick wrote.

The judge pointed out that Koenig's situation was vastly different from the type of "predator" the mandatory minimum was designed to punish. And a 'fit' sentence need not involve jail.

"The accused in this case lacked the intention to troll the internet for children. He did not start out looking for anyone, and first went online looking for a place to anonymously disclose the secret of his fetish," Skilnick wrote.

"Under these circumstances it is hard, in good conscience, to conclude that it is 'necessary to separate this Accused from society', if one is being intellectually honest."