— Both the state House and Senate voted Wednesday to override Gov. Pat McCrory's veto of House Bill 405, a law that proponents say protects private property rights but opponents say muzzles whistleblowers.

Dubbed an "ag-gag" measure by its critics, the bill gives businesses the right to sue employees who expose trade secrets or take pictures of their workplaces. Animal rights groups say the measure is aimed at curbing the kind of undercover investigations that have exposed abusive practices in factory farms and slaughterhouses.

"Whistleblowers are protected in this bill," Sen. Brent Jackson, R-Sampson, said on the floor of the Senate during a brief debate Wednesday afternoon.

Senators voted 33-15 to override the veto less than hour after members of the House voted 79-36 to pass the measure not withstanding the governor's objections. The bill will become law Jan. 1.

When McCrory vetoed the bill, he said he agreed with the goal of curbing the practice of people who get hired merely so they can film undercover or gather corporate documents.

"While I support the purpose of this bill, I believe it does not adequately protect or give clear guidance to honest employees who uncover criminal activity," McCrory wrote in his veto message.

Journalism groups and the AARP made similar arguments, saying that the bill would apply to all employers, not just the agriculture industry. Industry workers, they say, could be discourage from coming forward with evidence of elder abuse.

"To give one relevant example, allegations surfaced last year that employees at Veterans Affairs facilities in North Carolina had been retaliated against for whistleblowing," wrote Steven Nardizzi, chief executive of the Wounded Warrior Project. "As an organization dedicated to honoring and empowering injured service members, we are concerned that this legislation might cause wrongdoing at hospitals and institutions to go unchecked."

House sponsors said that critics of the bill were wrongly characterizing it.

"It doesn’t stop good employees from reporting illegal activities to other authorities," Rep. John Szoka, R-Cumberland, said on the House floor.

Those "authorities" would include law enforcement and regulatory agencies. It's unclear what might happen if a worker were to expose a practice to a journalist and whether that journalist would be liable. That's among the technical flaws opponents have said they wold like to fix.

"Some tweaking of this may well be in order," said Rep. John Blust, R-Guilford. "I hope we can find a vehicle for it this session, but I’m not willing to along with what I believe is misinformation."

It's not uncommon, Blust and Szoka pointed out, for lawmakers to pass separate "technical corrections" bill to fix legislation that has already passed.

But Rep. Becky Carney, D-Mecklenburg, said that the governor's veto had given lawmakers the chance to start over and get the bill right to begin with.

"If there is a major doubt, we have a chance to slow it down," Carney said. "Let's take it back. Let’s get it right. Fix those corrections in a real bill that we can all wrap our hands around."

In the end, Republican backers of the measure said it was important to protect businesses from bad actors and voted to pass the bill over McCrory's objections.

"We need to vote for this because it has gotten out of control what some so-called employees have done to businesses," said Rep. Pat McElraft, R-Carteret.

The move drew a quick rebuke from animal rights groups.

"Not only will this ag-gag law perpetuate animal abuse, it endangers workers’ rights, consumer health and safety, and the freedom of journalists, employees, and the public at large to share information about something as fundamental as our food supply. This law is bad for consumers, who want more, not less, transparency in food production," said Nathan Runkle, president of Mercy For Animals.