HONOLULU (AP) — A major shipping company has agreed to pay more than $15 million to compensate for a 2013 molasses spill in Honolulu Harbor, Hawaii's attorney general said Wednesday.

Attorney General Doug Chin called the settlement with Hawaii-based Matson Navigation Co. one of the largest for an environmental violation in Hawaii's history. The settlement includes a combination of cash, restoration efforts and funding for environmental programs, he said.

Matson is also agreeing to cease its molasses operation in Hawaii and pay for removal of its molasses tanks and any remaining molasses, Chin said.

The company will pay $5.9 million to the state, and the costs related to ending the molasses operation are estimated between $5.5 million and $9.5 million, which would put the total settlement amount between $11.4 million and $15.4 million, Matson Inc. said in a statement.

"The range Matson provides in its press statement appears to reflect a desire to report a smaller loss to its investors for its next earnings report," Chin said in response. "I have received assurances and the evidence strongly indicates that it will in fact cost $9.5 million for Matson to terminate its molasses operations in Hawaii. The state will make sure that Matson spares no costs and cuts no corners."

The 1,400 tons of molasses that spilled into the harbor in 2013 killed more than 26,000 fish and other marine life. Enough molasses to fill about seven rail cars oozed out from a section of pipe Matson thought had been sealed, suffocating marine life and discoloring the water as the sticky substance sunk to the bottom of the harbor.

The spill, in an industrial area about 5 miles west of Waikiki's hotels and beaches, shut down much of Honolulu Harbor for nearly two weeks.

Reaching a settlement allowed the state to avoid a lawsuit that would have taken eight to 10 years to resolve in court, Chin said.

The $5.9 million paid to Hawaii includes money to re-grow a coral nursery to help replace coral that had been damaged or destroyed. It will also reimburse the state for cleanup efforts and other costs, including nearly $2 million in legal fees. There will also be a contribution to the International Union for Conservation of Nature's World Conservation Congress, which is being hosted by Hawaii next year.

Matson executives said previously that they were not prepared for the possibility of a spill, despite transporting molasses from the pipeline for about 30 years.

Earlier this year, Matson Terminals Inc. pleaded guilty to federal criminal charges for illegally releasing the molasses into the harbor without a permit on Sept. 9 and 10, 2013. As part of a plea deal, Matson agreed to pay fines and restitution totaling $1 million, including $600,000 that went to the Waikiki Aquarium and Sustainable Coastlines Hawaii.

Matson is the biggest company that ships goods to Hawaii from the mainland.

"Matson has been a member of the community for more than a hundred years, and the company's leadership understands the damage the molasses leak caused," Gov. David Ige said in a statement. "The resolution allows reparations to occur now and helps see to it that such an environmental disaster does not happen again in Hawaii."

Now that there's a settlement with Hawaii, the company doesn't face any other pending claims, said Matson spokesman Jeff Hull.

"Environmental stewardship is a core value in our company, so this event was a blow to all of us at Matson," President and CEO Matt Cox said in a statement. "We can't take back what happened, but we've done our best to make it right."

Matson shares climbed 51 cents, or 1.3 percent, to close Wednesday at $40.07, and they were up 1 cent in after-hours trading.

___

Follow Jennifer Sinco Kelleher at http://www.twitter.com/JenHapa