An elderly farmer who illegally bred dogs in "cramped cold and dirty conditions" has been warned he could face jail.
An RSPCA officer told Flint magistrates Peter Hughes, from Halkyn, kept the animals in some of the worst conditions he had ever seen.
The court heard how inspectors found 64 dogs at the farm housed in "generally filthy and unhygienic conditions" with many of them having health problems.
District Judge Andrew Shaw heard how officials from Flintshire's Environmental Health department made an unannounced visit to the farm in March after receiving tip offs from members of the public.
Three people, including a vet, had bought puppies from the farm and were concerned for the welfare of the animals, the court was told.
Inspectors found 64 dogs at the farm - 48 of them puppies. Hughes had a licence which allowed him to keep no more than 12 dogs.
The hearing was told how there was inadequate water, some dogs were chained up in waterlogged conditions and that there were "numerous dead rats" on the premises, as well as a sheep carcass.
Many of the border collies were also suffering from parasitic infections and a number had ulcerated feet as a result of being kept on unsuitable mesh flooring.
Hughes pleaded guilty to breeding without a licence, breaching his pet shop licence, and six counts of causing unnecessary suffering by failing to provide a vet and by keeping animals in an environment that was detrimental to their health.
His defence said the offences had occurred because Hughes had taken on too much. They added that he was a single man and that assuming he would "face serious financial difficulties" if banned from keeping dogs. They were sitting on mesh with faeces on top of it and, generally, they were appalling - they're some of the worst sights that I've actually seen.