PROVIDENCE, R.I. (AP) — The imprisoned ex-mayor of a financially troubled city asked a federal judge on Thursday to vacate his corruption conviction and release him after an appeals court ruled the charge to which he pleaded guilty isn’t a crime.

A lawyer for Charles Moreau, the former mayor of Central Falls, just north of Providence, filed a motion on Thursday asking U.S. District Judge John McConnell to schedule a hearing on his request. The lawyer, Anthony Traini, said Moreau’s conviction, on a charge of accepting a gratuity by an official receiving federal funds, is now invalid and he should be released.

READ MORE: Woman Found Dead In East Baltimore Fire Was Shot Beforehand, Police Say

“The defendant is currently incarcerated for an offense found not to be embraced by the (formerly) applicable statute under which he was convicted, and he is therefore being held in violation of the Constitution and laws of the United States,” Traini wrote. “Consequently, his release from custody is required by law.”

A spokesman for the U.S. attorney’s office said prosecutors would reply to the filing with the court.

Moreau is about halfway through the two-year sentence he received after pleading guilty in November 2012 as part of a plea deal struck with federal prosecutors. As part of that deal, he acknowledged accepting a furnace and home renovations from a businessman who received a lucrative city contract. He was sentenced in February 2013.

In an unrelated case involving a politician from Puerto Rico, the 1st U.S. Circuit Court of Appeals last year found that the acceptance of gratuities by a public official is not covered by a federal law that criminalizes bribery. The U.S. Supreme Court has said that a gratuity is different from a bribe because it is not a quid pro quo meant to influence the official but rather is a reward for a future or past act.

READ MORE: Moderna's Vaccine Is The Most Effective, But Pfizer And J&J Also Protect Well, CDC-led Study Says

Other appeals courts have said accepting gratuities is a crime, but the U.S. District Court in Providence, where Moreau was charged and pleaded guilty, is in the 1st Circuit.

Moreau had been serving his prison term at a federal prison in Maryland, but last month the judge ordered him back to Rhode Island, where he’s being held in a state prison. The judge did not explain the reason.

Central Falls, the state’s smallest city, had a massive budget deficit and an unfunded pension liability officials said was $80 million. In 2010 it was taken over by a state-appointed receiver, and in 2011 it became the first city in Rhode Island to declare municipal bankruptcy. It has since emerged from bankruptcy and is no longer overseen by a receiver.

Gov. Lincoln Chafee, in his State of the State speech last month, listed the emergence of Central Falls from bankruptcy as one of the state’s recent achievements.

MORE NEWS: Maryland Unemployment Rate Lowest Since Onset Of The Pandemic, Data Says

(Copyright 2013 by The Associated Press. All Rights Reserved.)