MOUNT VERNON, Wash. (AP) — County commissioners in Washington state have settled a legal battle with an oil refinery and environmental groups arguing against plans to produce xylenes for shipment overseas.

The Skagit County Board of Commissioners signed the agreement Monday ending part of a three-part project by Marathon Anacortes Refinery, Skagit Valley Herald reported Tuesday.

The completed project would have reduced the sulfur content of its fuel products, reduced vessel emissions and produced xylenes often used in the manufacturing of plastics, officials said.

The refinery cancelled the xylene portion of the project after completing the part of the project that allowed it to reduce the amount of sulfur in its fuel products, refinery officials said. The refinery is expected to continue with construction of a marine vapor emission control system at its docks, officials said.

The project was part of a larger $400 million Clean Products Upgrade Project that was first proposed in 2014, officials said.

Some environmental groups raised concerns about the possible production of xylene saying it could increase the number of vessel trips, raise the risk of chemical spills and threaten the local orca population.

Breathing xylene vapors could cause dizziness, nausea and death in severe cases, health officials said.