The NYPD’s arrest of a man suspected of vandalizing a historic Brooklyn synagogue and attempting to set fire to several other Jewish institutions defied all expectations.

In the process, it provided a cautionary tale about jumping to conclusions in such emotionally charged cases.

The suspect, James Polite, is not — as many were surely expecting — a white supremacist. He’s African-American, raised by Jewish foster parents, a graduate of liberal Brandeis University and a one-time protege of former City Council Speaker Christine Quinn, for whom he worked on anti-hate-crime initiatives.

Yet that didn’t stop him, according to police, from scrawling “Hitler,” “Kill all Jews” and “Die Jewish rats” on the walls of the Union Temple.

He’s also, according to numerous reports, a young man plagued by a lengthy history of drug problems and mental illness — a far cry, in fact, from Robert Bowers, accused of killing 11 people at a Pittsburgh synagogue in a blatantly anti-Jewish attack. Yet the two men’s message was much the same.

Much of the news media and many on the left publicly accused President Trump of responsibility in the Pittsburgh attack, claiming his rhetoric fomented hatred.

The same crowd most likely expected to see a similar suspect emerge in New York. Yet according to the NYPD’s Hate Crime Task Force, not one person arrested here for anti-Jewish hate crimes in the past 22 months (with 142 such crimes reported) was associated with far-right or white supremacist groups.

Neither the right nor the left has a monopoly on hate crimes in general and anti-Semitism in particular. And the rush to point fingers before the facts are in isn’t about opposing hate, but weaponizing it.