RALEIGH, N.C. (AP) — North Carolina's only farmworker union is challenging a law limiting organized labor's activities in and around the state's vegetable and tobacco fields and other agricultural operations.

Their lawsuit filed Wednesday called the restrictions unconstitutional and discriminatory.

A last-minute House amendment inserted into the General Assembly's annual farm law last summer prohibits farming operations from collecting union dues from workers. It also blocks any future legal settlements requiring a farm to enter into a collective bargaining agreement.

Democratic Gov. Roy Cooper, who signed the bill approved by the Republican-controlled legislature, is a defendant in the lawsuit filed in Greensboro federal court seeking to block enforcement of the anti-union language. The Farm Labor Organizing Committee, the lawsuit plaintiff, lashed out at Cooper as he signed it in July, accusing him of refusing to side with migrant workers and the poor.

The restrictions don't apply to current agreements, but the farm labor group and two workers who also sued said they're designed to block the union's ability to organize and improve working conditions after recent successes. They also discriminate against a union membership that's nearly 100 percent Latino, in contrast to overwhelmingly white farm employers, the lawsuit filed by civil rights attorneys said.

The law "invidiously targets North Carolina farmworkers and their sole union and imposes legal disabilities and disadvantages not imposed on other workers or unions in the state," the lawsuit reads, adding that it creates "obstacles to constitutionally-protected speech and association."

Cooper's office didn't respond Wednesday to an email seeking comment on the lawsuit. In July, Cooper's spokesman said the governor had concerns with the bill but pointed out its bipartisan backing and that separate provisions benefited North Carolina's farming industry.

Larry Wooten with North Carolina Farm Bureau predicted Wednesday the law would be upheld. He said it doesn't halt union activities but rather prevents farmers from being forced to unionize or "serve as a treasurer for unions."

"This law reduces an unnecessary administrative burden on farmers," Wooten said in release. "It allows them to get back to what they do best — growing our nation's food and fiber."

While North Carolina remains near the bottom among states in the percentage of workers with union membership, the Ohio-based Farm Labor Organizing Committee has made strides in North Carolina over the past two decades. Amendment sponsor Rep. Jimmy Dixon, a farmer, said during House floor debate the restrictions were needed to protect the state's right-to-work laws and because of "continued harassment from out of state."

"There are predatory folks that make a good living coming around and getting people to be dissatisfied," Dixon said, according to the lawsuit.

Legislators aren't listed as defendants, but labor leaders criticized them in a news conference for the provisions. And FLOC Vice President Justin Flores said Cooper "certainly has culpability for signing the bill."

FLOC has two collective bargaining agreements in North Carolina covering 10,000 workers, including one involving 700 farms within the North Carolina Growers Association. The contracts expire in 2019 and 2020, so the law would apply to any future deals. Most of the laborers under the association contract are guest workers from Mexico.

Plaintiffs Victor Toledo Vences and Valentin Alvarado Hernandez allege the law will create hardships for them and other workers. Transient union members without bank accounts will have to hold on to cash before it's turned in, increasing the risk that they'll be robbed, the lawsuit said.

The law "effectively prevents FLOC from expressing and advancing the interests of its members," the lawsuit said.

Sen. Brent Jackson, a Sampson County farm operator, was a primary sponsor of the farm bill and a chief negotiator of the final compromise legislation that retained the House amendment. Jackson's farm company decided to leave the North Carolina Growers Association in 2014. He was sued last year by several former workers — FLOC members including Hernandez— seeking back wages and other financial damages. A financial settlement was reached. Jackson did not admit wrongdoing.

A farm worker advocate filed General Assembly ethics complaints against Jackson and another legislator last July over the anti-union language, but a legislative panel quickly dismissed them.