Shipping companies agreed to pay $96.5 million to settle a lawsuit with the operator of the crude oil pipeline that ruptured in October 2021, spilling tens of thousands of gallons of oil off the coast of Southern California.

Amplify Energy, the company that operates the pipeline, announced on Wednesday that it had reached an agreement with the companies that owned and operated the MSC Danit and COSCO Beijing — two cargo ships it accused of dragging anchors during a winter storm and damaging the pipeline.

“We are eager to move forward and turn the page on this unfortunate and preventable event,” Martyn Willsher, the president and CEO of Amplify, said in a statement.

Amplify had accused the companies of improperly allowing their ships to remain in San Pedro Bay ahead of a January 2021 storm, whose forceful winds and waves caused the ships’ anchors to drag across the seafloor into prohibited areas near the pipeline.

The company also reached a non-monetary agreement with the Marine Exchange, a non-profit organization that monitors and directs marine traffic at major Southern California ports, but did not provide details on the agreement.

The shipping companies also settled a lawsuit with Orange County business owners and residents earlier this month, agreeing to pay $45 million, while Amplify reached an agreement last fall to pay $50 million to those affected by the spill.