By Kay Henderson

DES MOINES, Iowa (Reuters) - Iowa Governor Terry Branstad signed a bill that could result in penalties on animal rights activists who pose as employees or attempt to get inside agricultural production facilities in other ways to expose possible animal cruelty.

The law has outraged a leading animal rights group known for its controversial tactics to expose animal cruelty, People for the Ethical Treatment of Animals (PETA), which said it may mount a court challenge and threatened a possible boycott of Iowa.

The bill, labeled "Ag Gag" by opponents, was signed on Friday but news of Brandsad's approval did not emerge until Monday.

Iowa action could set a precedent for other agricultural states as it is the largest producer of corn, soybeans and has the largest number of hogs and the sixth largest cattle herd.

"If somebody comes on somebody else's property through fraud or deception or lying, that is a serious violation of people's rights and people should be held accountable for that," Branstad told reporters on Monday.

The adoption of penalties in Iowa follows a series of cases where animal rights activists gained entrance to what they call "factory farms" including chicken and egg, hog and cattle production and processing facilities.

In one recent example, McDonald's stopped buying from egg supplier Sparboe after an undercover investigation by the animal rights group Mercy for Animals found dead hens in cages and live chicks discarded in plastic bags along with dead one. Sparboe had unwittingly hired a Mercy activist to work at its facility.

Such actions have also prompted food companies to reconsider suppliers who confine hens laying eggs in small cages and sows in crates while they are nursing piglets.

"This is going to come back to haunt Iowa agriculture more than they could ever imagine," Mathews said. "Iowa has singled itself out as the state with the most to be ashamed of and I don't think that is a very strong message to send to consumers."

Branstad said the new law would not affect whistleblowers, employees who see something and report it.

"Agriculture is an important part of our economy and farmers should not be subjected to people doing illegal, inappropriate things and being involved in fraud and deception in order to try to disrupt agricultural operations," Branstad said.

(Writing by David Bailey; Editing by Greg McCune)