Five months ago, the estate of Prince announced a major deal with the Universal Music Group for distribution rights for a substantial portion of the music star’s vast catalog. The largest of a series of multimillion-dollar contracts lined up in the months after Prince died, it was estimated at $31 million.

But in a turn of events that has stunned the industry, the deal has now been rescinded by a judge, after Universal accused representatives of the estate of fraud and misrepresentation during negotiations and threatened a lawsuit if the company was not allowed to withdraw from the deal and get its money back.

On Thursday, Judge Kevin W. Eide of Carver County District Court in Chaska, Minn., issued an order approving a request to rescind the deal that was filed by Comerica Bank & Trust, the bank that took over as administrator of the estate the day after the deal was signed.

Prince died on April 21, 2016, at age 57, from an accidental overdose of an opioid painkiller. He left no will, which has led to drawn-out and contested proceedings among his six heirs, some of whom did not want the Universal deal voided.