BOISE, Idaho (AP) -- Dairy farmers enraged by animal-rights activists trying to root out cruelty and abuse got a boost Friday when Idaho senators voted 23-10 to intensify punishments for those who trespass to film their operations without permission.

The measure would put people caught surreptitiously recording agricultural operations in jail for up to a year and fine them $5,000.

The bill, which now goes to the House, stems from a 2012 incident at Idaho's Bettencourt Dairy in Hansen where activists from Mercy for Animals captured images of workers caning, beating and stomping on cows.

Idaho's $2.5 billion milk industry argues the video was used by "agri-terrorists" not merely to curb abuse, but to harm Bettencourt's business — even after its owner fired the workers and cooperated with the animal-cruelty prosecution after activists told law enforcement.

Representative Sen. Jim Patrick, the sponsor from Idaho's dairy heartland surrounding Twin Falls, argued that no less than the state's food safety is at stake, invoking the specter of groups including al-Qaida sneaking onto Idaho farms and putting crops and other commodities at risk.

"We as a nation are at risk of losing a lot of our food to terrorism," Patrick said.

Nathan Runkle, executive director of Mercy for Animals based in Los Angeles, said Patrick's comments stretched the limits of hyperbole.

"Comparing activists who document illegal animal abuse and report it to law enforcement to terrorists who crash planes into buildings is offensive to anybody who has been a victim of a true terrorist attack," Runkle said. "Had our investigator not documented on hidden camera workers beating, punching and dragging cows, this abuse would have gone undetected and unpunished."

His group is active beyond Idaho. This week in Wisconsin, four dairy workers were charged with mistreating animals after Mercy For Animals showed them beating, kicking, stabbing and whipping sick and injured cows.

In the absence of government inspections, Runkle said, "the job of reporting abuse is often times left to nonprofit organizations like Mercy For Animals."

Still, the Idaho bill's Senate backers said dairy owners should be able to expect people working for them aren't lying on job applications simply to sneak onto their facilities to make videos.

In addition to the filming provisions, the bill would criminalize obtaining records from such operations by force or misrepresentation, while lying on an employment application for such a farm would also be outlawed.

Legitimate whistleblowers can still report abuse to the Idaho Department of Agriculture, whether this bill passes or not, said Sen. Todd Lakey, R-Nampa.

"This does not limit the ability of an individual to file a complaint," Lakey said. "It does not limit constitutionally protected speech. To me, it comes down to private-property rights."

Foes, meanwhile, included Senate civil liberties defenders who worried the bill is so broadly written, it could be interpreted to outlaw even legitimate activities.

Republican Sen. Curt McKenzie branded the measure too extreme, especially with existing trespassing provisions in Idaho's code addressing people who go onto somebody's property without permission.

"It may go beyond what we intend," McKenzie, R-Nampa, said.

Meanwhile, Democrats compared animal-rights activists to the muckraking journalist Upton Sinclair, whose 1906 book "The Jungle" about the Chicago meatpacking industry helped spur improvements to food safety and working conditions.

Senate Minority Leader Michelle Stennett, D-Ketchum, said the bill might actually backfire, undermining public confidence in the sincerity of Idaho dairies to protect their animals.

"This bill creates a perception the industry is hiding animal abuse," Stennett said.

Utah has a similar "ag-gag law," though it's being challenges in U.S. District Court on, among other things, free-speech grounds.