CHEYENNE, Wyo. (AP) — A measure that could prevent animal-rights groups from making surreptitious videos during undercover animal cruelty investigations has passed the Wyoming House of Representatives.

The bill would make it illegal to make video or audio recordings at agricultural operations under false pretenses. It passed the House 33-27 on Tuesday and now goes to the Senate.

The bill also makes it illegal to get access to those operations under false pretenses.

The Associated Press reports that supporters say the bill would stop animal rights groups from getting agricultural jobs only to make undercover videos. They say some of those videos have been heavily edited and were misleading.

Opponents, including the Society for the Prevention of Cruelty to Animals, say the bill would prevent well-meaning whistleblowers from exposing abuse.