PORTLAND, Ore. (AP) — Longshore workers have voted to return to work Wednesday for three Northwest grain merchants — in time for the wheat harvest.

The International Longshore and Warehouse Union said 88 percent of its members voted to ratify a contract running through May 2018.

The union says the contract includes work rule changes and raises.

The grain handlers association called the agreement fair and said it would allow the companies to remain competitive.

The companies operate terminals in Portland, Seattle and Vancouver, Washington. They are Louis Dreyfus Commodities, United Grain and Columbia Grain.

Two years of negotiations, lockouts and occasional violence centered on the companies' efforts to get management-friendly work rules to match those at other terminals along the Columbia River. The contract was reached after grain inspectors quit crossing picket lines.