ROCHESTER — Police have arrested a 41-year-old Massachusetts man on animal cruelty charges after they found multiple sick and dead animals living in squalor at a farm on Walnut Plain Road.

“I could not believe the conditions I saw at this location, it was horrendous,” said Police Chief Paul H. Magee about what he called the first serious case of animal cruelty in town. “The conditions were deplorable, the animals were ill and poorly cared for.”

Police said that on Tuesday they found 23 mistreated and neglected animals and charged Daniel V. Pacheco of 953 Walnut Plain Road with 21 counts of animal cruelty. Each count carries a sentence of up to 7 years in state prison and a maximum fine of $5,000.

Rochester Animal Control Officer Anne Estabrook first alerted police to possible animal cruelty during a state-required animal and barn inspection at the 5-acre property owned by Pacheco on Tuesday morning. He was the only person found to be living at the address at the time, Magee said.

Detective Donald Kemmett subsequently sought a search warrant for the farm. It was executed at 5:42 p.m. by Kemmett, Sgt. Robert Small and Officer Robert Nordahl. They were assisted by the Animal Rescue League of Boston, Rochester Animal Control and a Portuguese speaking officer from the Middleboro Police, according to a news release Wednesday morning.

During the investigation, police said they found 23 animals, including dogs, pigs, cows, goats and rabbits that “lacked adequate food and shelter, and were housed in pens filled with mud, garbage and feces.”

All appeared to be malnourished, many were sick and authorities found one baby calf dead. It has been sent to Boston for a necropsy to determine how it died, Magee said.

The pigs were being fed garbage which did not appear to have been cooked first as required by law. Two unlicensed dogs were also found at the site, Magee said.

Photos supplied by police show pigs knee-deep in mud and waste, goats in unclean pens and with uncooked vegetable matter mixed with chicken waste supplied as feed.

A veterinarian who was called to the scene determined that the animals were neglected and suffering to varying degrees. Some of the animals were near death and she estimated one calf would likely die overnight, police said.

According to Magee, all the officers who responded were horrified by the situation. The owner did not say anything about why he had so many animals nor the condition they were kept in, the chief said.

“In our opinion the condition of the farm and animals spoke for itself,” he said.

Officers also observed numerous violations of health and building codes at the address and the town building inspector and health agent were called to the scene. The conservation agent was also asked to investigate potential wetland violations, police said.

After his arrest, Pacheco agreed to surrender all his animals. The pigs remain at the farm, but the others are now in the care of a local livestock dealer attempting to nurse the animals back to health, Magee said.

Pacheco was arraigned in Wareham District Court Wednesday and will also be liable for the town health and building code violations discovered, police said.

Magee said he reminds residents that animal cruelty is a felony.

“If you are going to own animals, you have got to be responsible owners,” he said. “If you find you cannot care for them, you need to reach out for help. There are plenty of agencies and organizations to help with animals.”