MONCKS CORNER, S.C. (AP) — South Carolina’s state-owned utility has reached a settlement with the now bankrupt company hired to build two nuclear plants that were never completed to sell leftover equipment and supplies, three years after construction was halted.

The agreement between Santee Cooper and Westinghouse Electric Co. will have the companies evenly split the money made off selling major nuclear equipment that hasn’t been installed, according to the settlement announced Monday.

Santee Cooper will get 90% of the proceeds of all equipment that has been installed, and two-thirds of the profits from selling other equipment specific to nuclear projects, the agreement said.

Santee Cooper keeps all the remaining equipment, while the deal says Westinghouse will market and sell the equipment for up to five years.

The money the state-owned utility makes will go toward reducing billions of dollars of debt that Santee Cooper amassed during the construction of the two nuclear plants, which were abandoned in 2017 before generating a watt of power.

Santee Cooper has a 45% stake in the plants planned for a site north of Columbia. South Carolina Electric & Gas, which was since bought out by Dominion Energy of Virginia, had the majority stake and ran the project.

The money made from selling the equipment will also go into a rate freeze for customers, Santee Cooper said in a statement.