A federal appeals court in Manhattan ruled on Wednesday that, although it was not JPMorgan's intention, it clearly authorized its law firm to file papers in 2008 that unsecured much of a loan to General Motors.

The difference was critical because the automaker soon after filed for bankruptcy. During GM's Chapter 11, secured lenders were repaid in full while unsecured creditors lost out.

JPMorgan said it was reviewing the decision and its options.

The dispute involved the unintentional release of a lien on GM fixtures and equipment. At the end of 2008, the automaker was preparing to pay off a $300 million financing and had the Mayer Brown law firm ready the documents. The firm accidentally included a lien that secured the $1.5 billion loan in the list of security interests it terminated after the $300 million was repaid.

After GM filed for bankruptcy protection in 2009, the official committee of unsecured creditors asked a judge to rule that the $1.5 billion syndicated loan administered by JPMorgan was unsecured because of the mistake. JPMorgan argued the loan's security interest was unintentionally terminated and was therefore still in effect.

U.S. Bankruptcy Judge Robert Gerber sided with JPMorgan in 2013. He said that, while it was "initially tempting" to doom lenders to "live with their mistakes," he found JPMorgan had not expressly authorized the termination of the loan's security interest.

The unsecured creditors appealed to the U.S. Court of Appeals for the Second Circuit in Manhattan, which reversed Gerber's ruling. The three judge panel found that, while "JPMorgan never intended to terminate the main term loan" security interest, the bank had effectively given its authorization.

The appeals court noted that the filings ending the security interest were reviewed by the JPMorgan managing director responsible for the $1.5 billion loan and the law firm JPMorgan hired for the paperwork, Simpson Thacher & Bartlett.

"JPMorgan reviewed and assented to the filing of that statement. Nothing more is needed," the 15-page opinion said.

Eric Fisher, an attorney for the unsecured creditors, declined to comment.

The case is the Official Committee of Unsecured Creditors of Motors Liquidation Co v JPMorgan Chase Bank, U.S. Court of Appeals for the Second Circuit, No. 13-2187.

(Reporting by Tom Hals in Wilmington, Delaware. Editing by Andre Grenon)

By Tom Hals