New York (CNN)A federal judge has dismissed the National Rifle Association's petition for bankruptcy, saying it was filed in "bad faith" in order to avoid litigation by the New York Attorney General's Office, which has sued to dissolve the NRA for allegedly misusing charitable funds.The decision from Judge Harlin Hale came after a month-long trial in which NRA attorneys and officials argued that their bankruptcy case should move forward in Texas. New York Attorney General Letitia James' office intervened in the case and asked to dismiss the petition, saying the NRA's decision to file for bankruptcy in Texas and ask to be reincorporated there was a way to "remove the NRA from regulatory oversight."