GT Advanced Technologies and Apple have agreed to a deal that will let GT close the Mesa, Ariz. and Salem, Mass. factories where it was producing scratch-resistant sapphire, and void the contracts it had signed with its one-time partner.

GT, which filed to reorganize under Chapter 11 protection on Oct. 6, will exit the sapphire-making business and re-focus on manufacturing the furnaces used to grow the material.

The Merrimack, N.H. company will cut most, but not all, ties with Apple, and the two will go their separate ways.

However, Apple will be allowed to recover the $439 million it pre-paid to GT, the redacted settlement stated. Apple will receive a portion -- the exact amount was struck from the document -- of the sale of each sapphire-producing furnace that GT sells over the next four years. The furnaces in GT's possession include the 2,036 that were installed in the Mesa facility, which it will remove and store, then attempt to resell.

Apple will also be allowed to buy any of those furnaces, with the purchase price credited against the debt.

Although rumors had pegged sapphire as the cover material for iPhone 6 touchscreens, that didn't pan out. Instead, Apple went with Corning's Gorilla Glass. Apple does plan to use sapphire as the facing on the mid- and top-tier Apple Watch lines next year, however.

The closure of the Mesa plant has put hundreds out of work. In a statement today, GT said it had already laid off 650 there -- some remain to wind down operations -- and expects to also lay off an undisclosed number at its Salem factory. According to a filing with the Arizona government, GT will ultimately lay off 727 employees in the state.

GT, which was to crank out sapphire for Apple under an October 2013 agreement, imploded this summer. How and why the company collapsed remains a mystery, as the explanations filed with the court have been sealed. Apple has moved to block any public disclosure of GT's explanation, as well as any information about the numerous agreements it struck with GT last year.

In a court filing earlier this month, GT argued that the court should order it to submit unredacted versions of several documents containing information Apple considered top secret. GT had blacked out sections of those documents because it was afraid they would trigger penalty clauses, which would require it to pay Apple $50 million per secrecy violation.

Apple has yet to file its rebuttal, but it has demanded that even that counter be sealed by the court.

The settlement will likely scuttle any move by GT to make public its account of what drove it into sudden bankruptcy, as the settlement requires both sides to refrain from statements that would "disparage, denigrate or derogate any of the [Apple or GT] Parties, or any officer, director, employee, product, service, method, procedure or operation."

The only exception to the be-nice clause was for disclosures or statements "made pursuant to any subpoena or order of court."

But the facts may eventually come to light. On Tuesday, U.S. Bankruptcy Judge Henry Boroff, who oversees the case, said Dow Jones -- the parent company of the Wall Street Journal and Barron's -- could file a motion to intervene in the case. Dow Jones has argued that the public right to know outweighs Apple's desire to keep its business practices secret.

GT is expected to file the settlement agreement with the court on Monday. The next hearing on the court's docket is for Oct. 30.