A woman burns candles near the Bataclan concert venue in Paris. (Laurent Dubrule/European Pressphoto Agency)

THE MURDEROUS attacks on France on Friday night were aimed not at its security officers, not at tourists nor offices and factories, not at its museums or grand structures. Rather, the suicide bombers and gunmen stormed citadels of leisure and pleasure that reflect the joys of not only Paris but also all the world. The Islamic State was explicit in a statement, saying its aim was the “filthy streets and alleys” of “the capital of prostitution and vice.” What occurred here was a sad and painful revelation that this group, with its odious mind-set and brutal behavior, has leapt from its sizable statelet in Syria and Iraq to carry out terrorist attacks in the Sinai, Beirut and Paris. These killings are aimed at everyone who aspires to modernity and cherishes a free and open society.

Today, as the United States stands with France, there are lessons Americans can offer — and lessons we should learn together from this latest atrocity.

Americans witnessed unimaginable horrors 14 years ago as people jumped and fell from the windows of the World Trade Center. The nation did not give in to grief, despair or doubt about what it stands for, and we are confident neither will the French. We hope the French will realize, without making the mistakes the United States made in the first stages of its fight against al-Qaeda, that the West gains nothing if it sacrifices the rule of law. This is a war, as President François Hollande declared Saturday; it is a war that can be won, and it can be won without sacrificing the values that set us apart from our savage foes.

The attacks should also serve as a reminder of the risks inherent in President Obama’s insufficiently urgent approach to the war in Syria and the rise of the Islamic State. Mr. Obama last year vowed to “degrade and destroy” the group, but little progress has been made, and more recently he talked about containment as a goal. But what can containment mean in a war such as this? A quick look at the soccer crowds that escaped mostly unharmed in Paris brings home that this dreadful attack could have been far worse, and there is no reason to doubt that other attacks will follow as long as the Islamic State enjoys its sanctuary. The probable bombing of the Russian airliner in the Sinai, the deadly explosions in Beirut on Thursday, the onslaught in Paris — these should galvanize a more determined effort to destroy this group.

Finally, we hope that Americans — beginning with Republican and Democratic voters in Iowa — learn a particular lesson from this horror. The world is a frighteningly dangerous place, and it should be unthinkable to install as leader of the free world a demagogic carnival barker, or a clueless-on-policy neurosurgeon, or for that matter any politician who thinks the United States can just withdraw from the world and wish its problems away. The United States needs a leader who will recommit to a principled but determined fight for freedom — at home, in Europe and around the world.