Just a few hours into the gruesome terrorist attack on Nairobi’s Westgate mall, on Saturday, the Shabaab, Somalia’s Al Qaeda wannabe affiliate, assumed credit, calling its kill-team’s targeting of dozens of innocent shoppers “an act of justice.” Sixty-seven people were killed, along with five attackers, before Kenyan forces mostly took control of the mall on Tuesday; some of the last shooters had been holed up in its supermarket. The Shabaab reminded “Kenya”—as if it were a single sentient being beholden to its rules—of prior warnings that it intended to carry out attacks in retaliation for the Kenyan Army’s presence in Somalia. It had specifically mentioned the Westgate mall, a popular hangout for affluent Kenyans and expatriate foreigners, as well.

In the Shabaab’s murderous logic, the existence of a prior warning absolved them of guilt in the deaths of those people whom its commandos have murdered. The New York Times photographer Tyler Hicks, who is based in Nairobi, happened to be nearby when the attack began on Saturday and sent out some of the first photographs from the scene. Hicks’s images, and those of another veteran war photographer, Goran Tomasevic, are a haunting, chilling testimony. In some, we see Kenyan soldiers, guns drawn, their expressions twisted by adrenaline and fear, as they hide from and hunt the terrorists. In others, we see women holding babies, seeking a safe way out. In one unforgettably sad picture, a young couple lies side by side in a pool of blood at the closed entrance to a shop: the man’s arm is held protectively over the woman’s waist; they are both dead. In others, toddlers stand in shock next to dead bodies. In most of these images, there is horror in the foreground, and, behind, glimpses of the banal backdrop: lighthearted advertisements, items on sale.

The target was a sickeningly well-chosen one. Westgate, like a couple of other shopping enclaves around the traffic-clogged, bustling city, is a time-honored meeting point for affluent Kenyans and foreigners, especially on weekends. Whenever I am in Nairobi, I find myself at Westgate several times a week, either to buy an item I need, or to meet someone in the large, airy coffee shop on the ground floor. I usually take a peek at the handicrafts trolley on the second floor, too, to see if there is anything that might serve as a gift. A couple of years ago I bought my mother-in-law a red, white, and blue African-print cloth decorated with the smiling countenance of Barack Obama. The President’s late father was Kenyan, and his American-born son’s success is a source of widespread national pride. Westgate is not a white enclave; in addition to black Kenyans and white Europeans or Americans—working for embassies, or one of the U.N. agencies and myriad N.G.O.s that operate out of the Kenyan capital—there were always Indians and usually a few Arabs, too. There is a sizable South Asian émigré community in Kenya, and the Nairobi suburb of Eastleigh is home to some two hundred thousand ethnic Somalis. Among the dead are people from at least twelve nations.

The first time I went to Westgate, about four years ago, was to meet a Nicaraguan-born humanitarian-relief official who handled the U.N.’s relief program for Somalia. At the time, it was considered too dangerous for the U.N.—or any other international agency, for that matter—to maintain a permanent presence in Somalia itself, because of the Shabaab, which controlled most of the Somali countryside and a good portion of the capital, Mogadishu. (One of the Westgate victims, a Peruvian, was a sixty-three-year-old U.N.D.P. official. He was at the mall with his daughter, who was shot but survived.)

As with Al Qaeda and its Islamist extremist kinfolk, the Shabaab views all nonbelievers—or even Muslims espousing different versions of the faith—as heretics and belligerents. In the past, this murderous presumption has meant summary executions by the Shabaab inside Somalia for young men caught watching soccer on television, or cruel stonings and amputations for transgressors of other Shabaab diktats, such as those who listen to music or, as Xan Rice writes in The New Yorker this week, run a certain sort of restaurant. It has also, occasionally, meant the kidnapping and even murder of victims seized in Kenya and taken back to Somalia.

Indeed, it was the Shabaab’s habit of conducting violent cross-border raids that motivated the Kenyan Army’s 2011 military incursion into Somalia in the first place. The Kenyans’ goal was to secure a safe corridor along the country’s border. In recent years, a number of Westerners have been taken from Kenya’s Indian Ocean island-resort community of Lamu, which lies near the border with Somalia—several have died. Two Spanish women, who worked as relief officials at a large refugee camp in the northern Kenyan wastelands, were snatched and held for twenty-one months before being freed last July. With its economy heavily reliant on tourism, Kenya has suffered greatly from such Somali-related violence and previous Al Qaeda-linked terrorism—in 2002, at an Israeli-owned hotel in Mombasa; and at the U.S. Embassy in Nairobi, in 1998, which was an attack that presaged 9/11. (In each case, most of the victims were Africans.)

The Shabaab’s Westgate attack is but the latest of a lengthening string of atrocities by Islamist extremists. Most of the victims come from within the Muslim world, people killed either because they are from the “wrong” Islamic sect, or else belong to a rival faith. Many, though, just happen to be nearby when the jihadis’ bombs go off. On the day after the Westgate attack began, Sunni Muslim extremists in Pakistan set off bombs at a Christian church in the city of Peshawar, killing more than eighty parishioners. In Iraq, too, where Al Qaeda—that transnational mother ship of Sunni extremism—has been staging a resurgence, most of the several-times-a-week suicide bombings and other attacks are against Shiites. (There are not many Christians left anymore in Iraq to kill; most of the surviving members of the country’s ancient community have fled their homeland, as did Iraq’s Jews two generations ago.) In Syria, much of the multifarious butchery tearing that country apart also takes place along sectarian lines—there it is Sunnis against Shiites (including, broadly speaking, Assad’s Alawites) and Christians, and vice-versa.

The attack in Nairobi is horrifyingly similar in design to the terror attacks carried out by a team of ten Pakistani suicide commandos in the Indian city of Mumbai, in 2008, in which a hundred and sixty-four people died in attacks on two major hotels, the city’s Jewish center, and its train station. And, previously, there was the 2004 hostage-taking and subsequent massacre at the primary school in the Russian town of Beslan by Islamist extremists from Chechnya. The death toll there was three hundred and eighty people, including a hundred and eighty-six children. The largest such operation, of course, was the 9/11 attacks in the United States; a hallmark act of terrorism that has provided a model for copycats ever since.

The culprit here, beyond poverty and lack of education and all the rest of it, is political Islam and its aberrant variations, which together have taken a religious faith and turned it into a tool of warfare and a toxic adjunct of modern day globalization. The answer has to include a thus-far undetectable bout of soul-searching, especially among political, civic, and religious leaders in the Muslim world.

Terrorism has always been around, of course, though the scale and global reach of contemporary efforts points to something new. By comparison with today’s political violence, many of the guerrilla attacks in the proxy battles of the Cold War—many of them terribly prolonged and bloody—look like the stuff of amateurs. In the entire career of Ilich Ramírez Sánchez, a.k.a. “Carlos the Jackal,” who was long regarded as the No. 1 terrorist in the world, only a couple of dozen people died as the direct result of his various attacks; similarly, West Germany’s notorious Baader-Meinhof Gang tallied up thirty-four victims. Those days are over.

Above: Relatives of a shooting victim at the Westgate mall weep after identifying his body at the city morgue. Photograph by Jerome Delay/AP.