Pipeline operator Sunoco Pipeline LP has agreed to pay roughly $5.4 million to settle claims over crude oil spills from 2013 to 2015 in three states, the U.S. Department of Justice (DOJ) said in a statement late on Jan. 30.

Sunoco, an Energy Transfer Partners LP (NYSE: ETP) unit, will pay the $5 million of federal civil penalties tied to Clean Water Action violations for three spills in Texas, Louisiana and Oklahoma, according to the DOJ.

The company also agreed to an additional $436,274 payment to the Louisiana Department of Environmental Quality in civil fines and other spill-related costs. Mid-Valley Pipeline Co., which owned the pipeline that spilled in Louisiana, the largest of the spills, will be responsible to pay some of the penalties.

As part of the agreement, Sunoco will be required to perform additional inspections and repair faulty pipelines. The company will also be responsible for preventing and detecting corrosion, which caused all three spills, in pipelines that Sunoco is not currently using.