The judge who sentenced a longtime Alabama sheriff to prison following his conviction on theft and ethics charges wasn't licensed to practice law at the time, the defense argued in asking a court to overturn the verdict and punishment.

Attorneys for Mike Blakely, who was automatically removed as Limestone County sheriff because of his conviction last year, cited reporting by WAAY-TV in asking a court to set aside the case.

Pamela Baschab, a retired Jefferson County circuit judge, was appointed to preside over the Blakely case in February 2021 after every judge in Limestone County stepped aside. But Baschab's law license lapsed the month before she took over despite a constitutional requirement that judges have a license, the defense argued.

2 CHARGED WITH MURDER IN DEATH OF ALABAMA 4-MONTH-OLD IN 2000

Baschab was listed as "inactive" by the Alabama State Bar during the case, the defense said, so the conviction and sentence should be overturned.

Birmingham, Montgomery news

An Alabama sheriff, who was convicted for stealing money, claims the judge who made the ruling did not have a license in his appeal.

ALABAMA TRAIN ENGINEER CHARGED WITH RECKLESS MANSLAUGHTER

The state didn't file an immediate response to the motion, submitted late Wednesday. But Alabama Attorney General Steve Marshall told the station that Blakely's latest attempt to overturn his conviction was "meritless."

Alabama Bar Association officials sent Baschab a letter saying a sitting judge is not required to be a member, but it also encouraged her to remain active. Bar Association communications director Melissa Warnke told WAAY-TV the organization believes Baschab "was acting in good faith."

GOAT CAUGHT EATING ALABAMA DEPUTY'S PAPERWORK AFTER SNEAKING INTO VEHICLE

Blakely, who worked as sheriff almost 40 years, was accused of taking money from a jail safe that was used to hold inmates’ money and of depositing $4,000 in campaign funds into his personal account. He was sentenced to three years in jail but remains free on bond while appealing.