ALBANY – Localities will have an easier time regulating “puppy mills” under legislation signed Friday by Gov. Andrew M. Cuomo. It is a law pushed for years by animal rights organizations.

State law had left it to state agriculture inspectors, whose ranks have been thinned over the years, to keep an eye on pet dealer operations, while localities were barred from enacting home rule laws to regulate puppy mills on their own.

Cuomo said the legislation is a “win for those individuals and communities across the state that have fought for the health and safety of animals under the care of pet dealers.”

The legislation was sponsored by State Sen. Mark Grisanti, a Buffalo Republican, and Assemblywoman Linda Rosenthal, a Manhattan Democrat.

It was opposed by the pet dealer industry and some upstate lawmakers whose districts include puppy mill operations that supply dogs and cats to places like shopping mall pet shops.

It will now be up to municipalities to enact their own rules, which for the first time can be stricter than state law. If localities do so, they will now have the legal responsibility, not the state, to regulate and inspect pet dealers.

The new rules cannot, the law states, end up banning pet dealer sales if animals are properly treated and raised.

Grisanti said the new law will make New York one of the strongest in the nation when it comes to regulating and licensing pet dealers.

“Inadequate state resources previously made it impossible to detect unlicensed dog breeders who intentionally avoid regulation by quickly selling dogs online and through private sales,” Grisanti said.

Animal rights groups say some puppy mills abuse animals by raising them in cramped cages and outdoors. Besides the mistreatment to animals, they say consumers who bought such pets often ended up unknowingly taking home a sick dog or cat that later would require expensive care.

“The puppy mill industry wanted to keep the state law unchanged because it allowed maximum profit and minimum accountability,” said Matt Bershadker, president of the American Society for the Prevention of Cruelty to Animals.

Critics of the bill said it will lead to a confusing array of local laws on top of regulations that already exist by the federal and state governments.

They say the best way to insure better monitoring of abusive pet dealer operations is more state inspectors, not additional regulations.