Before you buy that adorable doggie in the window, you might want to know where it came from.

A new law passed Tuesday aims to crack down on “puppy mills” — the farms in rural states nationwide that churn out puppies by the hundreds and ship them right to pricey Manhattan pet stores.

“A typical puppy mill will have several hundred cages, stacked one on top of another, with three to four dogs in each cage,” said Tim Rickey, an ASPCA field investigator in Missouri. “Half of them live in their own urine and feces, and the animals on the bottom cages get the urine dripping down on them. It’s pitiful.”

A law called Proposition B was narrowly passed Tuesday in Missouri, which aims to improve living conditions for the dogs. Missouri produces up to 40 percent of the nation’s puppies, earning it its nickname “puppy mill capital of the country,” said Rickey. And over 60 percent of the dogs in New York pet stores come from Missouri, according to the ASPCA.

Dog breeders in Missouri fear Prop B will put them out of business, but one Manhattan pet shop owner said she supports the new law, which doesn’t go into effect until Nov. 2011.

“I’m all for it; I believe it’s great to make sure all the dogs are taken care of,” said Dana Derraugh, owner of Le Petit Puppy in the West Village. Derraugh said she buys some of her dogs from Missouri, but she uses only use small, privately owned breeders.

History

Puppy breeding was originally promoted by the U.S. Department of Agriculture during the Great Depression as a way for poor farmers to make money. Due to lax laws and the state’s central location, dog breeding stayed popular in Missouri.