CASPER, Wyo. (AP) — A lawyer for a coalition of environmental, animal rights and other groups told a federal judge Friday that two new Wyoming laws improperly bar them from gathering information about the impact of agriculture and other industries on private and even public lands.

The groups fear the measures will inspire other energy and development-friendly western states to follow Wyoming's lead.

The laws adopted this year prohibit trespassing to collect data. The Legislature passed them after a group of Wyoming ranchers and landowners sued a conservation group, saying it trespassed on private land to collect water-quality samples.

The coalition of environmental and other organizations says the state clearly is trying to block collection of the sort of information they use to challenge resource management decisions and reveal instances of animal cruelty. The coalition alleges in a lawsuit that the laws violate the U.S. Constitution.

The groups are the People for the Ethical Treatment of Animals, Center for Food Safety, National Press Photographers Association, Natural Resources Defense Council and Western Watersheds Project.

The state has asked U.S. District Judge Scott Skavdahl to dismiss the case. He heard arguments Friday and said he will rule later.

The state argues generally that the groups lack standing to challenge the laws, which haven't been used to support charges against anyone yet.

Justin Pidot, a Colorado lawyer representing the groups, told Skavdahl that while Wyoming could decide to increase the penalties for traditional trespassing, the state can't constitutionally prohibit people from gathering information and conveying it to government agencies.

"That's precisely what these statutes do — they prohibit individuals from communicating factual information to federal and state regulatory agencies," Pidot said.

Erik Petersen, senior assistant Wyoming attorney general, said the groups have a long history of trespassing on private property to collect data.

"I think it is beyond dispute that the reasonable prevention of trespass is a legitimate government interest," Petersen said.

Pidot and Petersen had different answers in response to questioning from Skavdahl over whether the laws would prohibit someone from taking a photo of private property from a highway right of way and submitting it to a government agency.

"When a person stands on public land, they're not trespassing. We're all in agreement with that," Petersen said. However, he said the public doesn't have a right to cross private land without the owner's consent to reach public lands.

Pidot, however, said the laws would establish civil and criminal liability for someone snapping a photo from the highway if they didn't have permission from the landowner to take the picture and permission to submit it to a government agency.

"That's what these laws do — they create civil and criminal liability for people who don't have all the levels of permission that I've discussed," Pidot said.

The Legislature enacted the laws after more than a dozen Wyoming ranchers and landowners filed a state lawsuit last year against Western Watersheds and its state director. The ranchers allege in the pending suit that the group ignored direct instructions or signs warning them not to trespass on private land in Fremont and Lincoln counties to gather samples.

Travis Bruner, executive director of Western Watersheds in Hailey, Idaho, said this week he believes elements of Wyoming's livestock industry are behind both the trespassing lawsuit and the new laws.

"They're both essentially directed at keeping environmentalists off of public lands, and to keep them from documenting harm to public lands that are done by the livestock industry," Bruner said of the laws.

Jim Magagna, executive vice president of the Wyoming Stock Growers Association, attended Friday's hearing. He said afterward that he believes anyone collecting data on state lands without advance permission from the state could be found in violation of the laws.

"The many reasons that were argued here today demonstrate the importance of this law," Magagna said. "And that is respect for private property rights."