(Bloomberg) -- The National Rifle Association’s bankruptcy filing was rejected by a Texas judge, leaving it vulnerable to a New York attorney general who is threatening to dissolve the powerful gun group.After a weeks-long trial, U.S. Bankruptcy Judge Harlin “Cooter” Hale on Tuesday dismissed the Chapter 11 case, which also included a proposal to reincorporate the New York-based association in Texas. New York officials claimed the filing was a bad-faith effort to use the protections of bankruptcy to avoid its lawsuit.The decision means that New York Attorney General Letitia James should have an easier time seizing the NRA’s assets if she wins her court case. James contends that NRA head Wayne LaPierre and others so badly mismanaged the group that it should be shut down.The NRA’s case foundered in part because the gun lobby acknowledged that it wasn’t having financial difficulty. The judge wrote that he agreed with the New York attorney general that “the NRA is using this bankruptcy case to address a regulatory enforcement problem, not a financial one.”James, a Democrat tweeted that the ruling shows “No one is above the law,” and she said she will continue to work to hold the group accountable. The NRA and its law firm didn’t respond to emails and calls seeking comment.The ruling raises the prospect that the NRA may be severely hobbled or completely disappear from the U.S. political landscape, where it has held enormous sway for years, beating back repeated attempts at stricter federal gun laws after mass shootings and building a fervent following closely tied to the Republican Party. It has spent millions of dollars to back candidates for president and Congress and on Supreme Court confirmation fights, and was the largest financial backer of Donald Trump’s successful 2016 campaign.The NRA filed for bankruptcy in January, several months after James sued in state court seeking to dissolve the organization for the alleged misuse by senior executives of tens of millions of dollars that belonged to the nonprofit.Before he ruled, Hale had offered few clues to how he was leaning. One came after testimony ended, when he posed a question: Can a financially healthy organization file for bankruptcy to protect itself from the risk that another court will find its dissolution “in the best interest of the public?”He answered his own question in his order.“The NRA is a solvent and growing organization using this bankruptcy as a tool to win its dissolution lawsuit, and that is not an appropriate use of bankruptcy,” he wrote.Expense QuestionsFor more than two weeks, Hale listened to testimony about palace intrigues, shredded notes and excessive personal spending at the NRA. One of the groups allied with New York is the gun lobby’s former ad agency, Ackerman McQueen Inc., which claimed the bankruptcy filing was made in bad faith and should be dismissed.The argument over its financial viability became a central point in the debate over whether the case was properly filed, since bankruptcy is typically reserved for people, companies and other entities that can’t pay their bills. Even the U.S. office that monitors bankruptcies said at the end of the trial that the NRA doesn’t belong in Hale’s court.“At various times in this case, the NRA has provided the Court with several -- and at times slightly different -- reasons for why this bankruptcy case was filed,” the judge wrote. The group’s treasurer and its chief financial officer only learned about the bankruptcy after it was filed.LaPierre said in video testimony he launched a “course correction” of the nonprofit’s financial controls in 2017, but also acknowledged there were lapses afterward in the oversight of payments to himself and other insiders.While one possible outcome of the New York lawsuit is dissolution of the NRA, the gun group still has defenses there, the judge said.“The question the court is faced with is whether the existential threat facing the NRA is the type of threat that the Bankruptcy Code is meant to protect against,” Hale wrote in his opinion. “The court believes it is not.”The case is National Rifle Association of America, 21-bk-30085, U.S. Bankruptcy Court, Northern District of Texas (Dallas).(Michael R. Bloomberg, founder of Bloomberg News parent Bloomberg LP, is a donor to candidates and groups that support gun control, including Everytown for Gun Safety.)Read MoreNRA Seeks to Escape N.Y. Pressure by Filing Bankruptcy in TexasNRA Must Face New York Fraud Lawsuit Seeking to Dissolve ItNRA’s LaPierre Voiced Fear of Prison Time, Ad Exec Testifies(Updates with James’s reaction in fourth paragraph.)For more articles like this, please visit us at bloomberg.comSubscribe now to stay ahead with the most trusted business news source.©2021 Bloomberg L.P.