Some Republicans and other Westerners have shown shameful intolerance.

Do Western nations think that Muslim lives matter less? Most of us would resist any such characterization of callousness. But Western outrage about the carnage in Paris, coupled with near-indifference to similar killings in the Arab world, suggests to many Muslims that a double standard exists — and they find it deeply upsetting.

In the past week, terrorists apparently aligned with the Islamic State conducted three savage attacks: The assaults in Paris that killed at least 129 people Friday night were the worst. But Sunni terrorists also struck Thursday in Beirut in a double suicide bombing that killed at least 43 in a Shiite neighborhood. Twin bombings in Shiite areas of Baghdad on Friday killed 26, and a string of bombs added at least seven more on Sunday.

These tragedies should unite Westerners and Muslims, and create a common solidarity against the terrorists of the Islamic State, whose rampages have killed far more Muslims than those of other faiths. It should now be obvious that the Islamic State will brutalize Muslim “apostates” and Christian and Jewish “unbelievers” with equal savagery. That has been its method since its founding more than a decade ago. What’s new is greater export of the mayhem outside the Middle East.

But instead of solidarity, some GOP governors were quick to argue that only Christian refugees from Syria should be admitted to the United States. It’s hard to imagine anything that would bolster the Islamic State’s narrative more. President Obama rightly called such intolerant rhetoric “shameful.” It’s also unwise. The same goes for Sen. Mario Rubio’s (R-Fla.) argument that there is a “clash of civilizations” underway. What does he say to the Muslim victims in Beirut and Baghdad?

Listen to Muslim voices, like Mohammed Fairouz, a prominent Muslim American composer. “I felt totally broken by the attacks on Beirut and Baghdad, but even more by the fact that our lives didn’t matter as much to the media as the lives of those in Paris. As long as this remains the case, as long as the West can’t fully see us as human beings by treating our losses as seriously as their own, then we will continue to have the root of the problem,” he wrote me in an e-mail Sunday.

The Paris-Beirut-Baghdad bombings should create a coalition of disgust, which could power the military and political alliance that’s needed to crush the Islamic State.

Yes, I know that many of the Muslim victims are Shiites, and that Sunnis fear domination by a Shiite Iran. But this play on sectarian hatred can’t work forever. Even Osama bin Laden recognized before he died that the Islamic State’s forebear, al-Qaeda in Iraq, was poisonous. He was so worried that Muslims would rebel against its savagery that he thought of changing al-Qaeda’s name.

What other lessons do we take from the terrorism of the past week? I had several thoughts, watching the television coverage and talking with Arab officials here in the United Arab Emirates.

● The jihadists are trying to create a theater of death, in which people cower at the fear of more random attacks. Unfortunately, nothing serves their goal more than the scenes of panic Sunday night near at the Place de la Republique, as people stampeded in the fear that another attack was coming. Jihadists will play that video over and over.

This is a war in which everyone gets a chance to show bravery under fire. The Islamic State and its copycats are taking their sadistic violence everywhere they can. If we cower and cringe, they win. It’s a time when Americans should be grateful that they have a Department of Homeland Security, and a strong intelligence service, military and police.

● Europe must urgently address the fallacy that’s at the heart of the European Union — that it is a borderless commonwealth and that border controls and anti-terrorist surveillance are for nasty Americans, not progressive Europeans. The liberal dream that is the European Union, one of the great achievements of the past half-century, will not survive intact unless it gets security right. Frightened people turn to demagogues.

The lesson Europe can draw from the United States’ experience after Sept. 11, 2001, is to react but not overreact. The United States was destabilized by the terrorist threat into actions that violated its values and, in that sense, its stability and power as a nation. President George W. Bush, supported by congressional leadership and an angry public mood, took some unwise actions, most of all the invasion of Iraq in 2003, and also the use of torture. The United States is still paying the price for these mistakes.

● Finally, the world needs to have a more mature debate about surveillance. Privacy is important. But no one wants to live in a world where the authorities can’t find out whom terrorist suicide bombers contacted over the past several years. Strong legal systems should allow the United States and Europe to get this balance right so that necessary surveillance is conducted under the rule of law.

This week brought another terrible chapter in what Gen. John Abizaid a decade ago called “the long war.” But it showed us the true face of the enemy, the common cause of Muslims and the West in fighting it, and the need for the tools that will be necessary to prevail.