Doug Hammel said Monday that he will bow out of the race for a seat on the state 4th Circuit Court of Appeal after learning from The New Orleans Advocate that he is ineligible to run.

Hammel, a former Jefferson Parish prosecutor, signed a notice to withdraw his name from the ballot and said he would mail it Tuesday to Secretary of State Tom Schedler’s office.

He had filled out qualifying papers on Friday to challenge incumbent Terri F. Love for the Division E seat on the Court of Appeal. But state Supreme Court rules say Hammel took himself out of contention when he agreed late last month to serve as an ad hoc judge for three days in New Orleans Traffic Court.

Court documents show that Hammel was appointed on July 28 as a fill-in while Traffic Court Judge Steven Jupiter took an annual leave. Supreme Court Justice Greg Guidry approved the assignment on July 30.

The problem: Supreme Court rules bar attorneys who accept such assignments from qualifying as a candidate “for election to any judicial office for a period of one year immediately following the termination of the appointment.”

Hammel signed a form July 28 spelling out his agreement not to qualify for any judicial office for a year, according to documents provided by the Supreme Court.

Hammel said Friday that he never got a copy of the form. When shown the document he signed, Hammel said he had thought the rule barred him only from running for a seat on the same court where he served as a temporary judge.

He said he recognized his mistake.

“It appears the language is pretty clear,” Hammel said. “They must have changed that. I’ve sat a bunch in years past, and it was different.”

A spokeswoman with the Louisiana Supreme Court said the rule, which appears to be aimed at eliminating an unfair quasi-incumbency for judicial candidates, has been in place for many years.

Hammel lost his bid for the Orleans Parish Juvenile Court bench last year in a heated runoff in which his campaign distributed fliers accusing rival Yolanda King of living outside New Orleans.

King beat Hammel for the seat, but she’s now under indictment for allegedly lying when she claimed a New Orleans domicile in her sworn candidacy statement last year.

Last week, listing a different New Orleans address, King filed papers to run for re-election.

Hammel said he would contact his attorney to make sure he’s not in hot water for his gaffe.

Follow John Simerman on Twitter, @johnsimerman.