HARRISBURG - In 2008, undercover videotapes made by The Oprah Winfrey Show exposing inhumane treatment of dogs in Pennsylvania's so-called puppy mills helped drive the passage of the nation's toughest kennel law.

Similar videos depicting conditions in large-scale agriculture operations across the nation have led to animal-cruelty charges and changes in laws.

In recent years, forces in the industry have pushed back, promoting legislation to criminalize undercover videotaping or photographing of farm operations. The proposals are widely known as "ag-gag" bills, and in Pennsylvania, where agriculture is the largest industry, a legislator announced one Wednesday.

State Sen. Michael Brubaker (R., Lancaster) said the bill he planned to introduce would be fair to would-be whistle-blowers and farmers alike.

Brubaker's bill, which has not been drafted, would allow farm employees to take pictures on the job but would forbid sharing them with "anyone or any outlet" except law enforcement, said Colleen Greer, the senator's spokeswoman.

"This is innovative and fair to producers that treat animals in a humane way," Brubaker said Wednesday. "But it leads to the prosecution of farmers that treat animals in an inhumane way. I see nothing but a win-win."

A spokesman for the Humane Society of the United States, which has conducted undercover investigations in Pennsylvania, said the bill might be worded differently from those in other states but could have a similar effect.

"They want something on the books that prevents us from exposing animal cruelty. That's their intent," said Matt Dominguez, the group's director of farm animal policy.

"Ag-gag" bills have passed in six Western states. Similar legislation was defeated in Indiana last week; bills are pending in 11 other states.

Among Brubaker's constituents is Kreider Farms in Manheim, one of the state's biggest egg and dairy producers. Last year, a Kreider employee secretly working with the Humane Society documented laying hens living in filthy, cramped cages, some filled with mummified remains of chickens.

Laura Koster, a spokeswoman for Kreider, said the company could not comment because it had not reviewed the bill's language, but called the Humane Society's allegations about Kreider unfounded.

Brubaker said that the Kreider issue did not prompt his bill, but that he is concerned generally about due-process rights of farmers accused of wrongdoing.

Both the Humane Society and the American Civil Liberties Union said there likely would be free-speech issues if the bill, for instance, barred farmworkers from sharing pictures on Facebook.

Andy Hoover, legislative director of the ACLU of Pennsylvania, said: "With only very narrow exceptions, the government cannot prohibit the distribution of photos and videos."