WILMINGTON, Del (Reuters) - JPMorgan Chase & Co JPM.N scored a partial victory on Tuesday in a long-running dispute over the repayment of a $1.5 billion loan it made to General Motors' bankrupt predecessor, known as 'Old GM'.

A view of the exterior of the JP Morgan Chase & Co. corporate headquarters in New York City May 20, 2015. REUTERS/Mike Segar/Files

U.S. Bankruptcy Judge Martin Glenn in Manhattan sided with the bank against Old GM’s unsecured creditors, who have been trying to claw back the money, finding that most assets securing the loan, like robots and conveyor belts, were “fixtures” covered by a JPMorgan lien.

Unsecured creditors had hoped to convince Glenn the assets were not covered by the lien, which would have cleared the way for them to try to recoup money that Old GM repaid to the bank.

JPMorgan said it was reviewing the ruling. A lawyer for unsecured creditors declined to comment.

In addition to determining if the assets were fixtures, Glenn was also asked to determine the value of the equipment. The judge rejected the bank’s proposed valuation, although he also rejected the valuation method proposed by unsecured creditors.

The legal fight stretches back to 2006, when JPMorgan loaned GM $1.5 billion and received a lien on GM assets.

Due to a paperwork error, a lien was invalidated in 2008, but other liens remained on fixtures in a multiple GM locations covering 200,000 pieces of equipment.

Glenn was only asked to rule on a representative subset of 40 assets that was subject of a two-week trial this year that culminated with Tuesday’s ruling.

The parties will now take Glenn’s ruling and begin mediated talks to settle the dispute.

The judge urged them to settle the matter out of court.

“With over 200,000 assets remaining in dispute, in the event the Court is required to make individual determinations on each of these 200,000 assets, cars very well might be flying around Mars by the time the dispute is fully adjudicated,” he wrote in his 196-page ruling.

GM’s predecessor filed for bankruptcy in 2009, beset by a deep U.S. recession, an enormous debtload, high labor costs and outdated car models.

Many assets were acquired and removed from bankruptcy by General Motors Co GM.N.