ANACORTES, Wash. — Marathon Anacortes Refinery has agreed to scrap plans to produce xylenes for shipment overseas, ending a legal battle over the project.

Various environmental groups had filed a series of appeals against the three-part project, which also included plans to reduce sulfur content of its fuel products and reduce emissions from vessels at its dock.

The Skagit Valley Herald reports the environmental groups agreed in the settlement not to contest the other two parts of the project.

Representatives of the refinery and environmental groups signed off on the agreement prior to the Skagit County Board of Commissioners signing it on Monday.

Xylenes are a chemical compound extracted during the oil refining process that’s used in plastics manufacturing.