The big news items this weekend were the terrorist attacks in Spain and the following election. The election removed the Conservatives, who had backed Bush in Iraq, and installed the Socialists, who are now saying that they will be tough on terror while also promising to withdraw Spanish troops from Iraq. Curiously, they don't appear to see any contradiction between those statements. Iraq is the hard edge of the war on terror, where US and allied troops are fighting daily against al Qaeda forces. Originally, the forces in Iraq were a combination of Ba'athist remnants and international, al Qaeda terrorists. Since Saddam's capture, the Ba'athists holdovers have dwindled and what remains are the terrorists. It seems to me that if the Socialists wanted to fight al Qaeda, that's where they'd want to be. Apparently not, though.
The first question is why the Spanish voted the way they did. The second question is how the terrorists will perceive it.
The second question is much easier to answer, so I'll start there. The terrorists struck in Spain, either because Spain was an ally to the US or because of a 500 year old grievance. Most likely both. All of Europe is the enemy to them, but some are more immediate enemies than others. (Al Qaeda's such a basket case of overlapping causes that I'm not sure there's enough central control to work out long term strategies.) Spain immediately elected a party that's wants to withdraw from the main front on the War on Terror. In the terrorists' eyes, they struck, Spain capitulated, and terrorist attacks just before national elections suddenly become their most effective strategy. They will try again, very likely in the US come October.
So, knowing that, why did Spain vote the way it did? Well, the first possibility is that they were planning to vote that way anyway, and the terrorist attack had no effect on the voting. The second possibility is that they blamed the Aznar administration for the attack in the first place. Whether they place the blam on the Iraq war, which was not popular in Spain, or just poor security, Aznar's administration makes a good scapegoat. The third possibility seems most likely to me, and that it was not Aznar's actions before the attack but after the attack, that it looked like he was playing politics, fingering the ETA rather than al Qaeda, rather than dealing with the problem head on (see here).
Whatever the reason, it was the wrong response. If we take terrorism seriously, if it influences our voting at all, the correct response to such attacks is to do exactly what the terrorists least want, refusing to be cowed. This is important not only for the results, but just to show the terrorists that terrorism does not work as a means of influencing us in their favor--it can only work to turn us against them.
Update: I should point out that the first reason Spain might have voted the way it did (it was planning to anyway) is almost certainly wrong. The projections pointed to a victory for the conservatives just before the bombing.