A New Orleans police officer who was fired after testing positive for a low level of marijuana in 2012 was reinstated in a ruling this week by a state appeals court.

A three-judge panel of the 4th Circuit Court of Appeal said the New Orleans Police Department didn’t have enough clear proof from Officer David DeSalvo’s drug test results to can him.

The court overturned a decision by the city’s Civil Service Commission, which found the department’s action was justified.

DeSalvo had been on the force for less than three years when he and his partner arrested an uncooperative suspect on Jan. 20, 2012. The suspect yanked a handcuffed hand away and struck DeSalvo on his head, cutting him.

That prompted an automatic post-accident drug test for DeSalvo, which resulted in a positive test for marijuana with a THC level below the federally recommended cutoff mark but high enough to prompt an investigation by the NOPD’s Public Integrity Bureau.

DeSalvo got another test shortly afterward from the same lab, of both his urine and his hair. Like other random tests he’d taken in the past, the new ones came out negative.

The appeals court found Wednesday that the NOPD didn’t show that DeSalvo’s actions “did in fact impair the efficiency and orderly operation” of the department.

In its ruling, the court highlighted a controversy surrounding the level of marijuana metabolites needed to constitute a positive drug test.

“There are a number of circumstances in the instant case which call the facts into question,” the court found as it ordered DeSalvo reinstated.

His attorney, Kevin Boshea, hailed the ruling. Boshea said the NOPD went too far in firing DeSalvo, particularly with a manpower shortage.

“In this particular circumstance, one simple error, which was marginal at best, if not nonexistent, cost this guy a job for a year,” Boshea said. “Here’s a guy who served with distinction as a police officer.”

Earlier, before the Civil Service Commission, DeSalvo argued that he shouldn’t have been drug tested at all, because it was his partner who let the suspect free his hand.

Chief Judge James McKay III and Judges Paul Bonin and Rosemary Ledet formed the 4th Circuit panel.

McKay wrote the opinion.