City teachers facing termination have been thrown a legal life preserver.

In a precedent-setting decision, a Staten Island judge ruled last week that the Department of Education took illegal shortcuts in firing a tenured teacher.

Judge Desmond Green said that a termination hearing can take place only after a vote by the Panel for Educational Policy establishes probable cause.

Green said the DOE ignored that requirement in canning Rosalie Cardinale and ordered her reinstated.

Longtime advocate Betsy Combier, who worked on Cardinale’s case, said the DOE has ignored the law for more than a decade — and thinks Green’s ruling sets a precedent to challenge other firings.

“This is huge,” she said. “This is a protection we are supposed to be giving tenured teachers. For all these years, they have not gotten it. It’s not right.”

Neglecting the probable- cause vote “violates Petitioner’s due-process rights and violates New York’s strong public policy protecting the integrity of the tenure system,” Green wrote in his decision.

Cardinale’s lawyer, Jonathan Behrins, said the DOE purposefully avoids the PEP vote because it exposes dubious terminations to more scrutiny.

A city Law Department spokesman defended Cardinale’s firing.

“We believe DOE’s determination was appropriate and lawful,” said spokesman Nick Paolucci.