A former federal law enforcement officer, accused of having a sexual motive for smelling a girl’s dirty underwear in her bedroom, will be allowed to serve unsupervised probation.

Deputy U.S. Marshal David Timothy Moon, 50, was touring a Phoenix home for sale last May.

While his real estate agent was in another room, Moon went inside a 3-year-old girl’s bedroom, according to a police report. He focused on the laundry hamper in the corner. He dug through the dirty laundry and pulled out what appeared to be a pair of girl’s underwear.

Video shows, Moon appeared to hold the underwear close to his face and appeared to smell them. Minutes later, he returned to the bedroom and again appeared to smell clothes in the laundry hamper.

After leaving the girl’s bedroom for the second time, he appeared to notice the nanny cam. He quickly covered his mouth and said, “goddamnit.”

While reviewing the footage, forensic psychologist Dr. John Delatorre described what he saw as “a compulsion.” While Delatorre says he has evaluated hundreds of sex offenders, he was not personally involved in Moon’s case.

“This isn’t someone who’s unsure and needs to look around and tries to figure out — is this thing what arouses me?” Delatorre said. “He knows immediately.”

The girl’s father, who was granted anonymity for this story due to the nature of the crime, received motion alerts from the camera. When he saw the recorded video, he called Phoenix police. The father later told a judge he increased security at his home.

“What if he comes back?” the girl’s father said. “What if he tries to hurt us or our daughter? What if he loses his job and has nothing else to lose?”

After hearing of the allegations, the U.S. Marshals Service fired Moon. He had been a federal agent for 24 years and worked in multiple states, including Arizona, Alabama, and Florida, according to an agency spokesman.

U.S. Marshals in Arizona did not supervise Moon. Instead, he reported to officials in Washington, D.C.

When asked whether Moon had faced similar allegations in the past, a spokesperson for the U.S. Marshals spokesman said they take all allegations seriously but can’t comment on personnel matters.

Phoenix police uncovered other red flags.

According to the police report, a girlfriend said Moon heard police were looking for him, so “he threw out his computer.” Police also found a video of “girls doing gymnastics” in an email from “him to himself” in Moon’s Gmail account.

Moon was indicted on two counts of felony trespassing with sexual motivation. He later pleaded guilty to misdemeanor trespassing following a plea deal.

“This is by far the stupidest thing I’ve ever done in my life,” Moon said in court during his sentencing last week.

“The actions by the defendant, in this case, show a need for evaluation, show a need for potential treatment, and that’s going to go unnoticed, untreated if there’s no evaluation done in this case,” Deputy County Attorney Marcus Beecher said during proceedings.

Judge Katherine Cooper denied the requests.

“It can seem unfair,” Cooper said, acknowledging the concerns of the victim’s family. “It can seem like it’s not enough.”

Cooper also acknowledged mitigating factors, such as Moon’s lack of prior crimes, his military service, and his work as a deputy marshal.

“The court believes that he is sincere in his remorse,” she said.

Moon and his attorney declined interviews.

“While the behavior that he demonstrates is sexually deviant, there’s concern that there’s not enough for maybe a jury to say he’s a sex offender,” Delatorre said.

Once he completes probation, Moon could apply for this trespassing case to be set aside. If approved, the complaint would be dismissed, and judgment of guilt set aside.

This story was originally published by Melissa Blasius on KNXV in Phoenix.

Copyright 2020 Scripps Media, Inc. All rights reserved. This material may not be published, broadcast, rewritten, or redistributed.