The Madrid bombs have done more than shake up Spanish politics.
By Paul Reynolds
BBC News Online world affairs correspondent
The bombs did more than shake up Spanish politics
They have shaken the coalition in the war on terror declared by President Bush.
And they have done so because Spanish voters moved into line with the French and German view that the war on terror has nothing to do with the war in Iraq.
Indeed the new mood in Spain is that the war in Iraq is a distraction and is making things worse.
Call for self-criticism
The Spanish socialist leader, Jose Luis
Rodriguez Zapatero, has already attacked the Americans and British.
"Mr Blair and Mr Bush must do some reflection and self-criticism. You can't bomb a people, you can't organise a
war with lies," he said.
Almost exactly a year after Jose Maria Aznar stood shoulder to shoulder with President Bush and Mr Blair in the Azores on the eve of the war against Iraq, his party has been removed from power partly because of the unpopularity of that war.
If al-Qaeda was behind the Madrid bombings, it could be said that this was a significant strike by the terror group. It has forced a change of government in one of Mr Bush's leading allies.
Not that Spanish voters support al-Qaeda, but nor do they support the policy in Iraq.
And, like the French and Germans, they want a rethink. In particular, they want a separation of the war on terror from the war in Iraq, which Mr Bush has said is the "front line" in the war on terror.
Balance of power in EU
The arrival of the Spanish socialists back on the European scene will also shift the balance of opinion on Iraq within the European Union. Mr Blair has lost a close ally and may have to turn further east to the new members joining on 1 May to reinforce his position.
Mr Bush and Mr Blair have themselves suffered what must be seen as a rebuke by the Spanish people.
Whether they suffer rebukes from their own voters in due course remains to be determined.
It is not at all a foregone conclusion that they will. It is worth noting that on the same day that Mr Aznar's party lost power in Spain, the single minded Vladimir Putin was returned to power without trouble in Russia.
His hallmark has been a ruthless approach to the issue of Chechnya, Russia's own war.
Mr Bush is arguing strongly in his re-election campaign that his leadership and determination are key assets and ones which his Democratic Party opponent John Kerry cannot match. Equally, Senator Kerry will argue that the doubts in Spain over Iraq match those of the American voters.
And the immediate reaction of the British Government has been to stand firm and to declare that there will be no change in policy. Foreign Secretary Jack Straw rejected the argument that countries which softened their approach would be safer:
"Nobody, nobody should believe that somehow we can opt out of the war against
"The idea that somehow there is some exemption certificate for this war against terrorism is utter nonsense," he told the BBC.
New effort in Iraq
One result of the Spanish election will be to reinforce the British and American efforts to get Iraq back in the hands of Iraqis. In that way, they hope to reduce the impact of Iraq on the wider campaign against al-Qaeda.
They will press for a new UN Security Council resolution in May to give approval to the handover of power to an interim Iraqi government by the end of June.
However, large numbers of foreign troops will stay, and under an American general, so they could still present a target and a reason for attacks.
The new Spanish Government will want to bring its troops home. But the Socialist Party has in the past left the door open by saying that they might remain if there was an UN mandate for them. Whether that remains the position in view of the strong feelings in Spain is a matter of debate.
Either way, the doubt over their future in Iraq opens up yet another unwelcome issue for President Bush.