How we react to terrorism has become a measure of who we are, as individuals and as a society. It is not clear yet whether the heinous massacre in Nice, France, was the work of a “lone wolf” or a terrorist network, but in a way it doesn’t matter. Each new attack, each new convulsion of fear, horror, grief and anger is a progressively greater test of enlightened civilization’s commitment to its core values.

Mohamed Lahouaiej Bouhlel, the 31-year-old Tunisian who drove a truck through a festive nighttime crowd celebrating Bastille Day on Nice’s seaside promenade, may well have been avenging some personal grievance with the weapon closest at hand. Or it may emerge that ISIS or some other organized terrorists pushed him to this atrocity, targeting France — the country with the largest Muslim population in Europe and the strongest embrace of secularism — for the third time in 19 months.

But whoever struck the blow, whatever its malevolent purpose or toll, the response cannot be to abandon the respect for human rights, equality, reason and tolerance that is the aspiration of all democratic cultures. Though it has become almost a cliché to argue that the goal of terrorists is to bring their victims down to their moral level, it is also a truth, and it must be reaffirmed after every attack.

That is what the French prime minister, Manuel Valls, did in the wake of the assault. Warning France that it had to learn to live with terrorism, he declared that the only dignified response was for the French to remain faithful to the spirit of July 14, “which means a France brought together and united around its values.”