VICTORIA -- Warning: This story contains graphic details. 

A Canadian military veteran who was caught with hundreds of images of child pornography and admitted to encouraging the sexual abuse of his partner's five-year-old son, will avoid serving jail time due in part to the post-traumatic stress he incurred while on multiple combat tours.

The 60-year-old man, whose name is not being published to protect the identity of the victims, pleaded guilty to possessing 881 child pornography images between February and April 2017.

He was sentenced Tuesday to 18 months under house arrest, followed by two years of probation and 20 years on the sex offender registry.

In reaching the sentencing decision, Victoria provincial court judge Mayland McKimm considered the man's "highly successful" 33-year career in the military, during which he attained a considerable rank.

The man was deployed on seven combat tours, including three in Afghanistan, two in Bosnia, one in the Golan Heights and one in Somalia. "In each of those theatres," McKimm wrote in his decision, "he witnessed atrocities of war." 

The judge ruled the accused "suffers from post-traumatic stress disorder as a result of service to his country" and was therefore seeking out "risky and deplorable sexualized behaviour to deal with his symptoms."

The behaviour McKimm cited included a series of text-message conversations the accused had in February 2017 – while he was deployed at sea with the navy reserve – with a woman he was in a relationship with.

The messages contained sexually explicit images of the woman's five-year-old son. The couple also discussed in graphic detail how they planned to sexually assault the child when the accused was back from sea.

"He encouraged the taking of sexually explicit photographs of the child and actively encouraged her exploitation of the child both in fantasy and reality," the judge wrote.

"He directed and encouraged the exploitation of the five-year-old son of his co-accused. There is, therefore, some evidence that he assisted in the production of child pornography, an aggravating circumstance."

The pair also discussed incapacitating the boy before assaulting him, and the accused advised the mother to "seek out young children in the neighbourhood" they could in turn victimize.

'It is this PTSD which is the central trigger'

Eight months later, the child's father was using an iPad he shared with the mother and discovered the graphic images and text conversations. The father called the police and a search of the accused's home eventually turned up more than 800 images of child pornography, according to the court record.

"While it may be that the young victim will forever remain none the wiser for his abuse, there is no doubt that this atrocious behaviour had real world victims in the guise of his father, who discovered this deplorable behaviour," the judge wrote.

"The court is also aware that the young victim has no doubt lost any meaningful relationship with his own mother who also committed these offences at the behest of [the accused]."

McKimm found no evidence the accused ever touched the child and found no further evidence that he acted on any of his sexually criminal impulses before his arrest in December 2017.

In a report submitted to the court, forensic psychologist Dr. Bruce Monkhouse attributed the man's behaviour to post-traumatic stress disorder.

"In my opinion, [the accused's] long-standing use of pornography and most recently engaging in very risky and highly inappropriate sexual behaviour with his partner, may to a significant degree, be due to his attempting to cope with the high levels of PTSD that he is currently experiencing," Monkhouse wrote.

The judge found the man "suffered an acute level of post-traumatic stress disorder" during his combat tours in the military, adding "regrettably this disorder was never properly diagnosed until well after these charges had surfaced and he found himself before the courts."

McKimm ruled that the man's PTSD, as well as other health conditions, including heart trouble and sleep apnea, leave him in "no medical shape to serve time incarcerated."

"Indeed it is this PTSD which is the central trigger which led both he and his co-accused to turn briefly to this dark and sinister sexual predilection," the judge wrote.

The child's mother is still facing charges related to the case.