More than 8,000 farmworkers brought to North Carolina under a federal visa program signed a deal Thursday for union representation, and the group said it would drop a five-year boycott of a major pickle company.

Mount Olive Pickle Co. also said it would increase the price it pays growers for cucumbers by more than 10 percent over three years, and the growers said they would in turn raise wages by the same amount for the workers who pick the vegetables.

State AFL-CIO officials called the unionization the largest in North Carolina history.

The deal between the Farm Labor Organizing Committee and the North Carolina Growers Association lets the Ohio union sign up legal migrant workers who come to North Carolina under the federal H-2A visa program.

The growers association uses the program to supply foreign labor to about 1,000 farms, including a small number that grow cucumbers for Wayne County-based Mount Olive Pickle, which says it has the second-biggest-selling brand of pickles in the country.

"Workers have never been able to speak for themselves, and the union agreement gives them an opportunity to do that without fear of retaliation," union President Baldemar Velasquez said.

The union agreed to end the boycott of Mount Olive Pickle that it launched in 1999. The union had said Mount Olive Pickle had a responsibility to improve working conditions on farms that grow its cucumbers. The company disagreed, saying farmers should handle labor issues.

No North Carolina groceries ever pulled Mount Olive pickles from shelves, though major groups joined the boycott, most recently the National Council of Churches and the United Methodist Church.

"I am one pickle packer who is glad to be out of a pickle today," said Mount Olive Pickle President Bill Bryan.

The agreements were signed during a news conference at a Raleigh church social hall, which was packed with union supporters and more than a dozen farmworkers who followed the event through translators. Two cucumbers adorned the signing table.