Bitcoin miner Core Scientific shut down mining rigs from bankrupt crypto lender Celsius’s subsidiary Celsius Mining on Jan. 3.

Core Scientific’s bankruptcy Judge David. R Jones ruled that Core’s motion to reject Celsius’ mining contracts doesn’t violate the automatic stay on Celsius’ property, CoinDesk reported on Tuesday.

The motion in question was filed by Core on Dec. 28 as an “emergency measure” to be released from its contractual obligation to Celsius. Core claims that hosting Celsius mining rigs is costing them $2 million per month. If the space allocated to these machines were used to host other clients, or its own machines, Core believes it could generate more revenue.

Core and Celsius have been engaged in a legal battle over the contracts spanning over several months, with the former alleging that Celsius has violated the terms of its agreement by not making required payments for power costs – something that Core claims has cost the firm $28,840 a day.

In a bankruptcy filing in October, Core claimed that Celsius owed the firm $5.4 million which was yet to be paid.

In a response filed after Core’s motion to reject the contracts, Celsius said it did not oppose the motion and agreed to have all of its rigs powered down by Jan. 3.

“We’ve agreed that they can turn off our rigs effective today, and that they don’t get to charge us, we don’t continue to pay for it,” said Celsius attorney Chris Koenig in the Tuesday hearing reported by CoinDesk.

However, Celsius claimed that over 37,000 mining rigs related to these contracts are the property of the Celsius bankruptcy estate and should fall under the jurisdiction of the Southern District of New York Bankruptcy Court.

Celsius is Core’s largest hosting client and also holds around 10% of Core’s secured convertible notes, amounting to $54 million.