Fifty-five percent of the workers voted to ratify the contract Saturday, four months after 55 percent of the workers rejected the last contract offer in December.
The lockout has affected more than 1,300 union workers in Minnesota, Iowa and North Dakota. According to the AP, company officials say many of those workers have retired or resigned.
The dragged-out work dispute has been over contract provisions regarding seniority and job security.
On Saturday, Crystal Sugar said it was good contract with substantial increases in wages and other benefits, The AP says.
Union local president Gayln Olson told Minnesota Public Radio that going back to work will be "a lot of hard work" and "a lot of transitioning" since workers have been off the job for so long.
Based in Moorhead, Crystal Sugar used replacement workers to run its plants during the lockout.
The vote margin to reject the contract has been narrowing since the workers were locked out on Aug. 1, 2011. The vote to reject the contract was 63 percent last June, down substantially from the first vote on the contract in the summer of 2011, when it was rejected by 96 percent of workers.
The local union president in Grand Forks told WDAZ Friday that there was no way to predict the outcome of Saturday's vote.
"All of the members I would have to say without a doubt would like to see something that's fair and reasonable from both sides and they haven't seen that from crystal sugar yet," John Riskey told the station.