The state Appellate Court on Thursday backed the ability of workers in New York’s agricultural sector to collectively bargaining and join labor unions.

The development was cheered by supporters of a bill meant to expand labor rights and benefits to farm workers, but blasted by the New York Farm Bureau, which promised to appeal.

The ruling comes as Democratic state lawmakers in the coming weeks are pushing for a vote a farm workers labor bill that would provide similar collective bargaining protections and allow workers on farms to be eligible for overtime.

“It is of utmost importance that the New York State Legislature step up and pass the Farmworkers Fair Labor Practices Act to codify the labor rights that farmworkers have been waiting on for decades, including a day of rest, overtime pay, unemployment benefits, and the right to collectively bargain,” said Sen. Jessica Ramos, the Queens Democrat who sponsors the legislation.

“I have been touring New York State, visiting farms and hearing the stories of both farmers and farmworkers, and it is clear that we must pass the Farmworkers Fair Labor Practices Act this session.”

But the New York Farm Bureau blasted the decision. The organization has opposed the legislation, versions of which were first proposed more than a decade ago.

“Our rural economy and local job opportunities will suffer,” said Farm Bureau President David Fisher. “And New Yorkers will find it harder to access New York grown food, instead, relying on food brought in from out of state, or worse yet, out of the country to feed their families. New York Farm Bureau fully intends to appeal the court’s ill-conceived ruling.”

The number of farms in New York has steadily declined amid a difficult dairy market. At the same time, some farms have struggled to find and retain workers as the federal government cracks down on immigration.

Gov. Andrew Cuomo has backed the labor bill for farm workers and praised the court decision.

“This is a victory for some of the most vulnerable members of New York’s workforce. From the beginning, we chose not to defend against this lawsuit because farmworkers never should have been denied the same basic rights as other workers and we believed this to not only be morally wrong, but also unconstitutional,” Cuomo said.

“My administration has proudly fought for working men and women across the board, from raising the minimum wage to strengthening worker protections in nail salons and the home health care industry – and we will never tolerate the abuse or exploitation of workers anywhere, period. I commend the court’s decision to correct this undeniable injustice and reaffirm New York’s principles of fairness and equality for all.”