DES MOINES, Iowa (AP) — The yearslong fight over laws prohibiting secretly filmed documentation of animal abuse is moving from state legislatures to federal courts as laws in Utah and Idaho face constitutional challenges.

Half of U.S. states have attempted to pass so-called ag-gag laws, but only seven have been successful. Animal rights groups, free speech activists and others have filed two separate, but similar lawsuits against ag-gag measures in two Western states. The lawsuits say the secrecy puts consumers at a higher risk of food safety problems and animals at higher risk of abuse.

But farm organizations and livestock producers say the laws are aimed at protecting their homes and businesses from intruders. Many states are watching closely the lawsuits to see if the constitutional challenges stick.