President George W. Bush has brought discredit upon his country for its treatment of prisoners at Guantanamo Bay and its dissemination of disinformation to justify war in Iraq. And last week U.S. commentators fell over one another in their indecent haste to condemn Spanish voters for propitiating Al Qaeda by throwing out Prime Minister Jose Maria Aznar. Appropriating Churchill with smug self-satisfaction, pundits recorded yet another instance of European “appeasement”–even before the Spaniards had finished burying their dead.

But Europeans have done little better. Aznar’s instinctive response to the atrocity in Madrid was to limit the electoral damage to his party, even at the cost of misleading the Spanish people. Elsewhere in Europe the temptation to use the Madrid murders as a further stick with which to beat America proved irresistible for many–as though Osama bin Laden would never even have noticed Europe had it not been for American perfidy.

As for the European Union, its reaction has been predictable to the point of parody: Brussels is now mired in what will doubtless prove an interminable squabble over who gets to “manage” the security portfolio. Somewhere between the American response (to abandon allies and laws in hot pursuit of the wrong target) and the European urge (to carry on political business as usual), there has to be a better way to meet the challenge now facing open societies. Perhaps we should look a little more closely at the Spanish case.

For 30 years the Spanish people have faced terrorism every day: not a one-time assault by foreign zealots but the permanent threat of death or mutilation in their streets, workplaces and homes, perpetrated by their fellow citizens. And they have responded to this shadow across their infant democracy with civic calm and a quite remarkable political unity. The Spanish authorities didn’t just police the terrorist movement down to a tiny, embattled core but–by granting extensive autonomy to the Basque homelands–they have starved the extremists of all political legitimacy.

Yes, it is easier to maintain a united front against a threat within a single country. But the existential threat posed to civil society within Spain was and is comparable to that posed by Al Qaeda to the fabric of the international community at large. ETA’s “strategy,” after all, has always been to kill, maim and terrify democratic Spain into abandoning its values, “revealing” its repressive face and polarizing its separate constituencies. Al Qaeda seeks nothing less, but on a global scale.

So Spain does have something to teach the international community. First, the importance of unity. The EU can no longer afford to bicker interminably over national voting rights or milk subsidies. These navel-gazing indulgences of Europolitics were once a tiresome side benefit of 50 years of peace and prosperity. Today they illustrate grotesquely misplaced priorities and are a reprehensible dereliction of political duty. If Europe cannot act as one, it will never be able to work in effective unison with the United States, much less offer an alternative.

But the world desperately needs Europe, for it is in Washington that the second lesson of Spain’s response to ETA has never been grasped: the best way to reduce terrorists’ leverage is to win over their constituency, even at the price of tactical compromise. Left unconstrained, the tunnel vision of the present U.S. administration is alarmingly self-defeating. The invasion of Iraq was a propaganda gift to ultra-Islamists; America’s unabashed partisanship in the Israeli-Palestinian quagmire is another. Far from draining the wellsprings of sympathy for violent extremists, U.S. policy is replenishing them.

But the third lesson from Spain is the most important. Terrorism is the existential threat of the age. Terrorism cannot be definitively overcome or resolved. To make “war on terror” is to indulge a dangerous fallacy. We shall be living with terrorists indefinitely. But there is an effective response. It is to live, in the words of the former East European dissidents, “as if”: as if democracy were not threatened; as if constitutional protections and the rule of law were still our highest priority; as if our political choices and civic values could not be influenced by those who would deprive us of them. The Spaniards have been doing this for 30 years and, to their immense credit, they did it again last week. That is the real lesson from Madrid, and it is a kind of victory–the only kind that matters.