We are thrilled that after months of tireless efforts and unwavering dedication, we have emerged victorious in our landmark Supreme Court defense of California’s Proposition 12. The decision, announced earlier today, upholds the nation’s strongest farm animal protection law and unanimously rejects the pork industry’s primary constitutional claim. The hard work, perseverance and passion of our teams and supporters played a crucial role in achieving this historic outcome.

Ever since we and our allies ensured the passage of Proposition 12 in 2018, we have been defending it against some producers seeking to overturn it. In today’s meat and egg industries, many animals are confined in cages so small they can barely move. Mother pigs are locked in “gestation crates” or “gestation stalls,” metal cages barely larger than the animals’ bodies. Similarly, calves used for veal are frequently tethered in crates too small to turn around. Most hens, meanwhile, are locked in battery cages so tightly they’re unable to extend their wings.

Proposition 12 requires that mother pigs, hens used for eggs and calves raised for veal be given at least enough space to stand up, turn around and extend their limbs. The law also bans the in-state sale of pork, eggs and veal produced via extreme confinement. Proposition 12, which was approved by voters in California with 63% voting in favor, has already freed millions of animals from cages as producers came into compliance.

More and more people agree that treating farmed animals with decency is simply the right thing to do. And yet the fight to uphold Proposition 12 has been fraught and arduous.

That’s because some in the meat industry have spent the last five years (and millions of dollars) trying to overturn the measure in court. We and other animal protection groups have stood by the state of California throughout its defense of Proposition 12. Every step of the way, our side kept winning, and the opposition kept appealing. That’s over now. Today’s ruling by the highest court in the land marks the end of the line in terms of opponents’ judicial efforts in this case.

Today’s decision was unequivocal in its pronouncement that “While the Constitution addresses many weighty issues, the type of pork chops California merchants may sell is not on that list.” While the lengthy opinion contains several concurrences and dissents, the Court unanimously rejected the pork industry’s primary claim: that Proposition 12’s ban on the sale of pork from cruelly confined animals is unconstitutional merely because it may have indirect so-called “extraterritorial” effects on out-of-state pork producers. The Court noted that “Companies that choose to sell products in various states must normally comply with the laws of those various states.” Proposition 12 is one more such law.

Ending the extreme confinement of farmed animals is not only crucial for animal welfare, but also critical for human health. The American Public Health Association, Infectious Diseases Society of America and Center for Food Safety submitted an amicus brief in support of Proposition 12, which stated plainly that the extreme confinement of mother pigs “poses a profound danger to food safety and public health in California.” Confining mother pigs in crates so small that they can’t even turn around “severely suppresses” their immune systems, making it so both they and their piglets are “more susceptible to disease.” These diseases can spread to humans, since pigs are “ideal mixing vessels for various strains of influenza virus, including human influenza.” Today’s decision made clear that California voters may have enacted Proposition 12 with the goal of reducing such health risks of food sold within their state’s borders.

The Court’s decision gives the judicial “green light” for further progress to be made on behalf of animals currently suffering from extreme confinement. This is an issue that resonates with people across various walks of life. A recent poll found that 80% of American voters—including strong majorities of both Republicans and Democrats—want a law like Proposition 12 passed in their states. So far, we have helped ensure passage of laws in 14 states (both “red” and “blue”) banning one or more forms of extreme confinement and/or the sale of meat and eggs that come from such cruelty.

So many organizations, donors and volunteers have made this progress possible, but we want to specifically recognize our intervening partners in the Supreme Court case: Animal Equality, Animal Legal Defense Fund, Animal Outlook, Compassion in World Farming USA, Farm Sanctuary and The Humane League.

Finally, we are very grateful to the California Attorney General and the lawyers in our Animal Protection Law department, as well as their partners at MoloLamken LLP and at Riley Safer Holmes & Cancila LLP, who together led and sustained this legal fight from beginning to end.

This is truly a historic moment for animals. The momentum from this win will boost our campaign for a permanent end to the extreme confinement of farmed animals in the U.S. and around the world.

You can keep up the fight for farmed animals by urging Kraft Heinz to keep its animal welfare promises and stop using gestation crates.

Sara Amundson is president of the Humane Society Legislative Fund.