A federal appeals court has reinstated the conviction of a Maine man for illegal possession of firearms, but also said it will allow him to appeal his sentence – despite the fact he has already served a prison term.

The history outlined in Thursday’s ruling by the 1st U.S. Circuit Court of Appeals in the case of Wayne Carter of Rockland describes a tangled series of legal events that began in 1997.

“This appeal challenges us to figure out how best to put a case back on track” following a conviction, a vacation of that conviction, a dismissal of the indictment, a government appeal of that dismissal, and then the restoration of the original conviction, Justice William J. Kayatta wrote for the three-judge federal panel that decided the case. The case has been “around the barn and back,” he wrote.

The ruling orders a federal judge in Portland to re-enter Carter’s conviction and confirm his year-and-a-day prison sentence while allowing him to appeal the sentence. He completed his prison term last year. But the appeal of the sentence could affect whether Carter has to have two years of supervised release, which have not yet begun.

Carter initially pleaded guilty in state court in 1997 to assault. The victim was Carter’s girlfriend and the mother of one of his children. Thirteen years later, he was indicted for possession of three hunting rifles in violation of a federal law barring possession of firearms by someone convicted of misdemeanor domestic violence. But subsequent U.S. Supreme Court rulings threw into question whether Carter’s conviction for assault met the criteria of a violent domestic assault outlined in the statute on firearms possession.

At that time, the appeals court tossed the case back to U.S. District Court in Maine, which, sorting through the signals sent out by the Supreme Court, decided to withdraw the indictment because the form of assault on which Carter was originally convicted wasn’t established and therefore, a determination that it was a violent domestic assault could not be made.

However, subsequent court rulings determined that the basis for Carter’s 1997 conviction was, in fact, a misdemeanor of domestic violence. That’s why the appeals court this week ordered his indictment and conviction reinstated.

Carter’s federal defender, J. Hilary Billings, said that the rifles Carter was accused of possessing had been inherited from his father and were kept in a safe in his mother’s house. But Carter took them out to pawn them and then transported them back to his mother’s house after redeeming them from the pawnshop, forming the basis for the possession charge.

Billings sought a reduction in his sentence under a provision in the law that allows a more lenient term if the illegally held firearms are used for sport or are part of a collection. The District Court turned away that argument, but the appeals court ruling will allow him to pursue that on appeal while reinstating his conviction and the prison term.

Billings said he will ask the court to hold off on imposing the supervised release while the appeal of that part of the sentence is pursued.