Spain and Britain were the United States' closest allies in the war on Iraq. However, as security is tightened across Europe, it is the Germans - among the most vocal opponents of the war - who are now calling for an emergency meeting of European security chiefs.
"We are convinced that we have to take this possible development very seriously, as it would certainly lead to a new security assessment for all of Europe," German Interior Minister Otto Schily told reporters in Berlin Sunday.
A Moroccan arrested in the Madrid train bombings had ties with an alleged al Qaeda cell leader charged with helping plan the Sept. 11, 2001, attacks in the United States, a Spanish indictment shows.
The 700-page Sept. 17, 2003, indictment by Spanish Judge Baltasar Garzon names Jamal Zougam - one of three Moroccans arrested Saturday in connection with Spain's worst-ever terrorist attacks - as a "follower" of Imad Yarkas, whom Garzon jailed for allegedly helping plan the attacks on New York and Washington.
Zougam's alleged al Qaeda links strengthen suspicions that the terror group was involved in Thursday's Madrid bombings, which killed 200 and injured 1,500.
Spain's ruling conservative Popular Party conceded defeat. With 79 percent of the votes counted, results showed the Socialists winning 164 seats in the 350-member parliament and the ruling Popular Party taking 147. The latter had 183 seats in the outgoing legislature.
Turnout was high at 76 percent. Many voters said Thursday's bombings were a decisive factor, along with the government's much-criticized handling of the initial investigation.
"The defeat of the Popular Party in Spain is evidently attributable to both the perception that the government mishandled the information about the terrorist attacks and because of the hostility to their strong alliance with the U.S.," said CBS News Foreign Affairs Analyst Pamela Falk. "It is mind-boggling that the overwhelming support and empathy for the U.S. from the EU after 9/11 has become antagonism and distance, related in large part to the war in Iraq and its consequences."
Until the bombing, the conservative Popular Party was projected by most polls to beat the Socialists, although perhaps without retaining their majority in the 350-seat Congress of Deputies.
But the disaster, which the government initially blamed on the Basque separatist group ETA, threw the election wide open. The attack was followed by emotional rallies across the country.
Critics accused the government, which had trumpeted its crackdown on ETA, of manipulating the investigation for political gain. That struck a chord with voters.
"The Popular Party has made me lose faith in politics," said Juan Rigola, 23, a biologist in Barcelona. "It deserves to lose and to see the Spanish people turn against them."
The electorate of 34.5 million included about 1.9 million mostly young voters added to the rolls since the 2000 general election.
"I didn't intend to vote, but changed my mind," said Javi Martin, 30, who works for a TV station in Madrid. "And not because of the attacks, but because of the responsibility of the Popular Party. They gave out information drop by drop. It would have benefited them if it were ETA."
Some voters were angry at outgoing Prime Minister Jose Maria Aznar, accusing him of making Spain a target for Islamic extremists because of his support for the Iraq war, despite the opposition of most Spaniards. Aznar sent 1,300 Spanish troops to Iraq after the conflict and 11 have died.
"I wasn't planning to vote, but I am here today because the Popular Party is responsible for murders here and in Iraq," said Ernesto Sanchez-Gey, 48, who voted in Barcelona.
Other voters, however, expressed support for the ruling party precisely because it endorsed the Iraq war, and for its crackdown on ETA.
Mari Carmen Pinadero Martinez, 58, a housewife, said she "voted to help the government end terrorism" as she cast her ballot near the downtown Atocha railway station where trains were bombed.
In El Pozo northeast of Madrid, site of one of the four blasts, a ruined train car was in clear view of the polling station as were flowers for the victims, signs stating "Paz" (Peace) and dozens of lit candles.
Some of the voters, teary-eyed, held onto relatives and friends for support.
The Interior Ministry has announced five arrests in the bombing, including three Moroccans, and discovery of a videotape in which a man speaking Arabic says Osama bin Laden's al Qaeda network claimed responsibility for the attack.
In Morocco, authorities said one of the five detainees had been under surveillance for months and was suspected of ties to Islamic radicalism.
On Sunday, a Basque-language daily published a statement by ETA in which the group for a second time denied involvement in the attacks.
A handful of young protesters screamed "murderer" at Mariano Rajoy, the ruling party candidate for prime minister, as he cast his vote in an elementary school outside Madrid. "We did not want to go to war!" they shouted.
Rajoy declined to comment on the arrests or videotape. "These elections come at a time of great pain," he said.
As Aznar voted in Madrid, some bystanders cheered him while others shouted, "Manipulator!"
"All Signs Point to al Qaeda," the country's largest circulation newspaper, El Pais, said in a front-page banner headline Sunday.
The videotape was recovered from a trash basket near a Madrid mosque after an Arabic-speaking man called a Madrid TV station to say it was there, Interior Minister Angel Acebes said.
The political campaign was bitter between Rajoy, 48, a veteran Cabinet minister under Aznar, and Jose Luis Rodriguez Zapatero, 43, a lawyer, member of parliament and the Socialist party's general-secretary.
Before the attacks, polls gave Rajoy's party a 3-5 percentage point lead over the Socialists in the race for the 350-seat Congress of Deputies.
Aznar did not seek re-election, complying with a pledge to not seek a third four-year term.