A homeless man in Oregon was sentenced to 20 months in prison after admitting to sexually abusing a horse in Washington County.

The Washington County District Attorney’s Office said Kenneth Duyck was found guilty of sexual assault of an animal and unlawful of a motor vehicle.

The investigation started after a homeowner said she went out to her horse stables and found one of her horses tied up in a way that she didn’t leave it. She also noticed some other items had been moved, but nothing appeared to be stolen.

The owner’s daughter, a veterinarian, suspected the horse had been sexually assaulted so she took some samples, which authorities said linked Duyck to the crime.

Investigators found him sleeping in a stolen vehicle in a Walmart parking lot.

Duyck is also ordered to register as a sex offender and complete mental health treatment plans.