LONDON (JTA) — The last two festivals to be added to the Jewish calendar prior to modern times — Purim and Hanukkah — are both about anti-Semitism. There is one obvious difference between them: Haman, of the Purim story, wanted to kill Jews. Antiochus, of the Hanukkah story, wanted to kill Judaism. It was the difference between Nazi Germany and Soviet Communism.

But there is another difference that has renewed salience after the horrifying knife attack in Monsey, N.Y. What saved Jews on Purim was behind-the-scenes influence: Esther’s influence in the royal court. But the danger of anti-Semitism remained. What if hatred returned and this time there was no Esther around to save the Jews? That is one reason, according to the Talmud, why we do not say Hallel on Purim.

On Hanukkah, by contrast, Jews fought back and won. The Maccabees became a symbol of Jewish activism, of refusing to live in fear. As a symbol of this, the original custom was to light Hanukkah lights outside the front door of the house, or at least in a window facing the street, to publicize the miracle. Today, we see the lighting of giant menorahs in the most prominent public face of cities throughout the world.

Hanukkah tells us not to curse the darkness, but instead to bring light to the world. It tells us to fight back and not to be afraid.

The shocking events in Monsey, together with those in Jersey City, Poway, Pittsburgh and elsewhere, are proof that the darkness has returned. It has returned likewise to virtually every country in Europe. That this should have happened within living memory of the Holocaust, after the most systematic attempt ever made by a civilization to find a cure for the virus of the world’s longest hate — more than half a century of Holocaust education and anti-racist legislation — is almost unbelievable. It is particularly traumatic that this has happened in the United States, the country where Jews felt more at home than anywhere else in the Diaspora. Why is it happening now?

First, because of everything associated with the internet, smartphones, viral videos and above all, social media. These have what is called a “disinhibition effect.” People are far more hateful when communicating electronically than when speaking face-to-face.

Cyberspace has proved to be the most effective incubator of resentment, rancor and conspiracy theories ever invented. Anti-Semitism thrives on conspiracy theories, versions of the Blood Libel and the Protocols of the Elders of Zion, updated for the twenty-first century.

Second, because of the way people encounter these phenomena: often alone, in the privacy of their own home. This allows them to be radicalized without anyone realizing it is happening. Time and again, we read of people carrying out horrific attacks, while those who knew them recall not having seen any warning signs that they were intent on committing evil attacks.

The most dangerous phenomenon of our time is the “lone wolf” attack, because it is so hard to predict. The internet is particularly dangerous for loners, people in whom the normal process of socialization — learning to live with others who are not like us — has broken down.

Historically though, the most important factor in the rise of anti-Semitism is the sense among a group that the world as it is now is not the way it used to be, or ought to be.

The far left has not recovered from the global collapse of communism and socialism as ideologies. Hence the assault on Jews as capitalists and libertarians.

The far right feels threatened by the changing composition of Western societies, because of immigration on an unprecedented scale and low birth rates among the native population. Hence white supremacists.

Many radical Islamists are troubled by dysfunctions in the Muslim world. Hence the emergence of anti-Zionism as the new anti-Semitism.

These concerns do not, in and of themselves, lead to anti-Semitism. One other factor must be added.

When bad things happen, good people ask, “What did I do wrong?” They put their house in order. But bad people ask, “Who did this to me?” They cast themselves as victims and search for scapegoats to blame.

The scapegoat of choice has long been the Jews. They were the archetypal outsiders. For a thousand years, they were the most prominent non-Christian minority in Europe. Today, the state of Israel is the most significant non-Muslim presence in the Middle East. It is easy to blame Jews because they are conspicuous, because they are a minority and because they are there.

Anti-Semitism has little to do with Jews — they are its object, not its cause — and everything to do with dysfunction in the communities that harbor it.

Anti-Semitism, or any hate, becomes dangerous in any society when three things happen: when it moves from the fringes of politics to a mainstream party and its leadership; when the party sees that its popularity with the general public is not harmed thereby; and when those who stand up and protest are vilified and abused for doing so.

All three factors exist in Britain now. The same must not be allowed to happen in America.

What, then, must we do? The first priority must be to strengthen security in Jewish venues, to intensify police patrols and to develop habits of vigilance. The British Jewish community has a fine example in its Community Security Trust which, with the support of government grants, monitors risks, enlists thousands of volunteers to stand security duty and works closely with the government and local police forces. “Lone wolves” tend to seek soft targets, and the Jewish community must ensure as far as possible that there are no soft targets.

Next, we must recognize that while we have enemies, we also have friends — and they are many and strong. In Britain, as we faced a leader of the opposition who many of us felt has made his party a safe haven for anti-Zionists and anti-Semites, it was enormously important that non-Jews from all walks of life came out in our support. It made us feel we were not alone.

Many surveys in the United States have shown that Jews are the most admired of all minorities. We cannot fight anti-Semitism alone. The victim cannot cure the crime. We need to make friends who will stand with us and help lead the fight. This is best done by explaining how antisemitism endangers everyone, because the hate that begins with Jews never ends with Jews.

Lastly, we must never forget the message of Hanukkah: Fight back. Never be afraid. Whatever the threats, be proud to be Jewish and share this pride with others.

At times our history has been written in tears, yet we have outlived every empire and every civilization that sought to destroy us. Our spirit, symbolized by the Hanukkah candles, is indomitable. Where others spread darkness, let us bring light.

Rabbi Lord Jonathan Sacks is a global faith leader, philosopher and the author of over 30 books, who served as Chief Rabbi of the United Kingdom and Commonwealth from 1991 until 2013. You can follow him on social media @RabbiSacks or via his website www.RabbiSacks.org.

The views and opinions expressed in this article are those of the author and do not necessarily reflect the views of JTA or its parent company, 70 Faces Media.