How ironic that Mahmoud Ahmadinejad got a far warmer welcome at Columbia than David Petraeus did at CUNY.

The retired general and CIA director was accosted and taunted Monday with in-your-face shouts of “war criminal” and “scumbag” — and promises that they would continue to confront him at every class. To his credit, Petraeus kept his cool.

The same cannot be said for the university that hired him.

Even worse than faculty and professors coming out to harass Petraeus is an administration that refuses to denounce the outrageous behavior. Instead, CUNY’s dean of its honors college issued a mealy-mouthed, politically correct statement calling on everyone to show “mutual respect and understanding” so that “multiple points of view be heard.”

We’re all for multiple points of view, and upholding the right to protest. But the way to ensure this is to insist that faculty and students and guests behave and are treated in civil ways. What happened to Petraeus is an insult not only to him but to the entire university community — at least those committed to advancing “reasoned debate.”

Interim CUNY Chancellor William Kelly needs to apologize publicly to Petraeus, condemn this uncivil behavior and make clear it will not be tolerated.