What can we make of the terrible events in Nairobi, where innocent shopping trips turned into a bloodbath? It is usual to think of such horrors as acts of senseless killing. For every civilized person, the slaughter is inexcusable and incomprehensible. But in this case, as in so many others, it is not inexplicable.

The notion of a “clash of civilizations” has gained widespread currency since the September 11 al Qaeda attacks, particularly in the United States, where the idea has not only been used to explain why many young Muslims hate the West but to encourage a general fear and suspicion of all Muslims.

Islamists set out to violently counter the perceived decadence of Western capitalism. Those who use such intolerance to promulgate hatred against Muslims in general do not do justice to the subtlety of the arguments on the “clash of civilizations” made by Bernard Lewis, the Princeton professor who requisitioned the phrase for modern use, and the late Samuel P. Huntington, the Harvard and Columbia academic who came to similar conclusions.

In Nairobi, Islamists from lawless, pirate-ridden Somalia have been waging war against their Kenyan neighbors, who have been fiercely fighting back. According to the Kenyans, the Islamists are almost defeated and the Nairobi shopping mall massacre was their last desperate attempt to turn the tide.

Certainly the Islamist killers achieved the one aim they prize above all: They have drawn attention to their cause. How many had heard of Osama bin Laden until he brought down the Twin Towers? The Nairobi slaughter, like the 9/11 attacks, was a propaganda coup. The fact the terrorists targeted a Western-style shopping mall, patronized by prominent, prosperous Kenyans — President Uhuru Kenyatta’s nephew and his fiancée were among the at least 67 people who were killed — suggests the terrorists were protesting against commerce and symbols of the West.