A man who had hundreds of live and dead Chihuahuas and Chihuahua mixes in his Detroit-area home has pleaded guilty to an animal cruelty charge in a deal that keeps him out of prison.

Fifty-six-year-old Kenneth Lang Jr. of Dearborn made the plea Tuesday in Wayne County Circuit Court. He had faced up to four years in prison.

Under the deal, Lang gets five years' probation, may not own animals and must pay $3,000 restitution to the Animal Legal Defense Fund.

In July, authorities found Lang was hoarding the dogs. They say some dead dogs in freezers in the home may have been killed with an injection.

Defense lawyer James Schmier says his client needs treatment for an obsessive-compulsive disorder.