(CNN) California pet stores soon will be allowed to sell dogs, cats and rabbits only if they come from shelters or non-profit rescue organizations.

Under legislation going into effect on January 1, store operators also will have to be able to provide records of origin for the animals or face a $500 penalty per animal.



Under the law, individuals are still allowed to buy from private breeders, but stores are prohibited from doing so. The Pet Rescue and Adoption Act was introduced by assembly member Patrick O'Donnell and signed into law by California Governor Jerry Brown in October 2017 Under the law, individuals are still allowed to buy from private breeders, but stores are prohibited from doing so.

In a press release issued at the time, O'Donnell touted the law as an end to "puppy mills" and "kitten factories." California is the first state in the country to introduce such legislation.

O'Donnell called the law a "big win for our four-legged friends" and also for taxpayers, who he said spent more than $250 million a year to house and euthanize shelter animals.

Read More