Gov. Kathy Hochul on Thursday signed legislation aimed at cracking down on puppy mills.

The bill was passed by the Legislature earlier this year and will eventually ban the sale of dogs, cat and rabbits from pet stores in New York state, starting in 2024.

The goal is to crack down puppy mills, which breed animals in squalid conditions for profit.

“Puppy mills are cruel breeding factories that keep animals in small cages where they are neglected, they rarely see a veterinary, they are aren’t fed well, but they are there to breed over and over again. And once they are done breathing, they are discarded," said Manhattan Assemblymember Linda Rosenthal, who sponsored the bill.

Under the terms of the agreement with the governor, the effective date for the legislation will be two years from when it’s signed, giving retailers time to adjust to a new business model.

Pet stores will be permitted to charge rent to shelters who want to display pets in those stores for adoption.

Pet store owners say the new law unfairly targets their business model, while not doing enough to crackdown on actual puppy mills.

 “One of the worst bills signed in the history of New York State," said Emilio Ortiz, a Chelsea pet store owner. "The bill does not legally increase welfare standards for breeding dogs. It does not hold inhumane breeders directly accountable for their actions or shut them down. And it does not prohibit inhumane breeders from out of state from selling their digs in state or in the internet.”

But supporters of the new law say most pet stores already got the message about direct sales to customers.

 “We see there used to be hundreds of pet stores in this state, they’ve now dwindled down to maybe 60 or 65 because the market understands. Consumers understand. There are places to get animals like rescues and shelters," said Rosenthal.

State Sen. Michael Gianaris of Queens, who sponsored the bill, said people will still be able to adopt and purchase pets, but there will be better protections for those animals who are often bred in mills under deplorable conditions.

“They can go to a shelter and adopt one of the hundreds of thousands of animals that are sitting there waiting for adoption who are in need,” Gianaris said. “These are great animals that are in need of help. If someone wants a particular breed, they have an allergy, they have some desire to have a particular breed, they can still deal directly with breeders.”