Calling the city’s action “shocking to anyone’s sense of fairness,” a Brooklyn judge has ordered the FDNY to pay an $82,500-a-year disability pension to a firefighter sacked three years ago for using cocaine.

Ex-Fire Commissioner Sal Cassano fired Alphonso Sicignano in 2011 as part of the department’s zero-tolerance policy, rejecting his claim that emotional scars from digging at Ground Zero led to drug and alcohol abuse.

“Given these facts, the termination of petitioner Sicignano for his use of cocaine is shocking to anyone’s sense of fairness,” Schack said in a ruling three months ago posted recently on the city’s Web site.

At the administrative hearing, Sicignano (inset) said he suffered from post-traumatic stress disorder from the death of his mother, the death of a close friend who was killed in a fire and memories of harrowing experiences on and after 9/11.

The 15-year veteran was scheduled to work that day but swapped shifts with a colleague, who died in the attacks.

Sicignano rushed to the scene and spent days searching for bodies.

The Fire Department suspended Sicignano after a positive drug test in 2009. But six months later, he was ruled fit for full duty.

Sicignano tore his shoulder at a fire on his first day back on the job. The injury tore his right rotator cuff, requiring two surgeries and leaving him unfit to work.

The cocaine charges still hung over his head, placing his disability pension at risk.

In a rally of support, senior fire officials testified in behalf of Sicignano at a May 2011 administrative hearing, with Battalion Chief James Fody calling him “indispensable to a commanding officer,” while Deputy Chief Roger Sakowich named him the best firefighter in Engine Co. 6.

Administrative Law Judge Alessandra Zorgniotti ultimately ruled that Sicignano should be allowed to leave the force with his disability pension intact.

“Having asked [Sicignano] to risk his life and limb to protect the public safety, the department should permit him, as it would any other firefighter, the chance to pursue a disability retirement provided by law,” she said.

Citing the “zero tolerance” drug policy, Cassano axed Sicignano.

The decision meant his family would lose an estimated $1 million in lifetime pension payments.

Unless the department appeals Judge Schack’s decision, Sicignano will be reinstated so he can file for his disability pension — although he faces a hefty fine for the drug violation.