LAKEWOOD, Ohio (WJW) — A man who hoarded dozens of beagles pleaded guilty Friday to multiple counts of animal cruelty.

City police in December served a search warrant at the man’s Waterbury Road home and rescued 41 beagles that were being kept in unsanitary conditions, FOX 8 News reported. The city building department later declared the house to be uninhabitable, according to the release.

(WJW photo)

As part of a plea arrangement to avoid incarceration, the man surrendered the dogs to the city and agreed to pay restitution to the city for their care. The dogs are now in the care of Lakewood Animal Shelter and are being re-homed, according to the release.

He was court-ordered into a five-year diversion program that includes a mental health assessment, classes on the ethical treatment of animals and grief counseling “to address underlying causes of his behavior,” the release states. During that time, he won’t be allowed to own or have custody of dogs.

If he violates terms of the agreement, he faces up to 18 months in prison, according to the release.

“I want to thank our Animal Control Officers, Lakewood Police, and everyone on staff who pitched in to address this situation, to care for these unfortunate dogs, and to ultimately get them into a healthy situation,” said Lakewood Mayor Meghan F. George, who also serves as Safety Director. “Our prosecutors have done an excellent job of ensuring that the charges fit the offense, but also placing a priority on getting full custody of the dogs in an efficient manner so they can move on to better forever homes as soon as possible.”