The horrific bombings in Spain, which claimed more than 200 lives, were sad proof that terrorists can achieve success when their target is a government that has distanced itself from its people and pursued a misconceived counterterrorism policy. It also shows, in particular, that George W. Bush’s “war on terrorism” is wrongheaded and dangerous.

All decent people mourn the loss of innocent lives and want the thugs who mount such attacks brought to justice. But let’s be clear. The perpetrators of the Madrid attacks–who as of this writing seem to be Islamic fundamentalists–were able to meet their apparent objective (punishing the Popular Party government of José María Aznar) only because Bush had drawn the Spanish government into a dubious exercise: war on Iraq.

Bush and his lieutenants argued before the war that it was imperative to invade and occupy Iraq because Saddam Hussein had a massive number of WMDs and operational ties to Al Qaeda. Most of Washington’s allies, a large number of Americans and majorities in other countries–including Spain–didn’t buy that argument. Their skepticism has been borne out. As José Luis Rodríguez Zapatero, Spain’s incoming Prime Minister, declared, “You can’t organize a war with lies.” He has vowed to pull Spain’s small but symbolic force out of Iraq by the end of June unless the military operation there is handed over to the United Nations.

The attack in Madrid was a reminder that the high concept of Bush’s war–smashing Saddam as a dramatic victory in the war on terror–has no foundation in reality. In fact, the attack reinforces the opposite view: that the war on Iraq has undermined the effort against Al Qaeda. The war in Iraq may well have stepped up the spread of Osama bin Laden’s strain of virulent anti-Americanism among Muslim extremists while hampering US efforts to neutralize Al Qaeda. A recent Washington Post article notes that the CIA–the lead agency in the fight against Al Qaeda–has been stretched thin by its responsibilities in Iraq. And James Webb, Secretary of the Navy in the Reagan Administration, has observed, “Bush arguably has committed the greatest strategic blunder in modern memory. To put it bluntly, he attacked the wrong target…and, in so doing, bogged down a huge percentage of our military…our military is being forced to trade away its maneuverability in the wider war against terrorism.”

It is understandable that Spaniards would react to the horror by booting a government that had defied their wishes. Many Spanish voters were also upset by the government’s all-too-quick attempt to blame Basque separatists for the carnage. (Imagine that: an electorate rejecting a government for misleading it.) Conservatives in the United States decried the anti-Aznar vote as a blow to the war on terror. It was no such thing. It was a repudiation of the phony case Bush made for war in Iraq, a case Aznar too willingly accepted. It was a statement that Spaniards–and no doubt other Europeans–have little confidence in Bush’s leadership and fear they’re paying the price for his arrogant missteps.

The Spanish vote was a warning. The United States is now more isolated in Iraq, and Bush’s war on terrorism is further discredited globally. As the Spanish bombing makes clear, effective counterterrorism requires close coordination among nations on intelligence and police matters–not invasions of countries with no connection to 9/11. Such cooperation is unlikely if the United States and its allies are divided over the Iraq war.

Bush responded to the Madrid attack with predictable stay-the-course rhetoric. But we need a new course–one that can win the support of nations and people around the world.