THERE MAY NOT be specific connections between the bombings in London and Egypt, or the relentless wave of suicide attacks in Iraq, or the near-collapse of the Israeli-Palestinian cease-fire following a terrorist strike. But the overall pattern this summer is plain: The forces of Islamic extremism, which at the beginning of this year appeared significantly weakened by the war against terrorism, have managed a counterattack of surprising strength.

The violence has not approached the scale of Sept. 11, nor has it employed the weapons of mass destruction that al Qaeda and other extremist groups are known to be seeking. But the loss of life -- at least 56 in London, 88 in Sharm el-Sheikh, 178 in four major bombings over two weeks in Iraq -- has been grievous, and the ingenuity of the terrorists has surprised some experts. British citizens have carried out suicide attacks in their own capital, a shocking development for the country's large Muslim community. At the same time, the preliminary evidence that al Qaeda operatives based in Pakistan may have had a hand in the bombings suggests that the reach of Osama bin Laden may not be as diminished as the Bush administration and other Western governments believed.

The political impact extends beyond the shock to governments and the misguided and fruitless debate about whether Western policies in Iraq or elsewhere are responsible for such wanton acts of murder. Iraq's critical effort to consolidate a new political system, now focused on drafting a constitution, has been slowed; the momentum for democratic change that appeared earlier this year to be growing elsewhere in the Middle East, including in Egypt, has slackened. Palestinian-Israeli talks have stalled. An incipient debate in London about new domestic security measures, including some restrictions on civil liberties, could soon spread to Washington and other Western capitals.

This is, in fact, a time to remember that the threat from al Qaeda and other Islamic extremists remains very real and that more attacks are likely, in the Middle East, in Europe and in the United States. If there are lessons to be learned from this summer's damage, they should be acted on: for example, the strong evidence from London that more monitoring cameras would make Metro and other transport systems more secure. Cooperation could be further improved among Western intelligence and law enforcement agencies. But it is also important to remember the lessons of the anti-terrorist campaign of the past four years: Some of the steps taken to improve security have done more harm than good. The overzealous detention of immigrants and abuse of Iraqi detainees by the United States is one example; there was also Egypt's arrest of 3,000 suspects after a Sinai resort bombing last year, a move that produced many allegations of torture but failed to prevent a second attack. Police in London following shoot-to-kill procedures last week gunned down a man on a subway train who turned out to be an innocent Brazilian.

As the war deepens, it's becoming clearer that the political remedies matter more. Muslim communities from Pakistan and Saudi Arabia to Europe and the United States must take greater responsibility for defending against the perversion of their faith and confronting the murderers in their midst -- without exception. The Bush administration should stop accepting the arrest of scattered suspects by allies such as Pakistani Gen. Pervez Musharraf as a substitute for concerted action to reform religious schools and shut down extremist movements. Genuinely democratic elections in Egypt will do far more good than another brutal dragnet. Above all, the United States and other nations must continue to do all they can to help Iraq stabilize under a representative government capable of defeating the foreign Islamic extremists who have chosen it as a battlefield. The militants have succeeded in creating a moment of trial for the Western democracies and their allies. It is crucial that the civilized world summon the willpower to turn them back.