Jose Luis Rodriguez Zapatero, calling the war that ousted Saddam Hussein an "error," said he would recall Spanish troops from Iraq by June 30 unless the United Nations assumes control of multinational military operations there.
In a surprise defeat, Prime Minister Jose Maria Aznar's conservatives on Sunday became the first government that backed Washington in Iraq to be voted from office. The election came amid charges that Aznar made Spain a target for terrorists by supporting the war, and that his government concealed possible connections between the attack and Islamic terrorists for political gain.
Many voters used the polls to show their anger at the outgoing government, reports CBS News Correspondent Elaine Cobbe. As Aznar cast his ballot Sunday, protesters brandished placards saying, "Your war, our dead."
Thursday's train bombings — the worst terrorist attacks in Spain's history — killed at least 200 people and wounded some 1,500.
France on Monday called for an urgent meeting of European Union foreign ministers, saying it was crucial for the EU to react to the attacks against Madrid with vigilance and unity.
"It is essential that we regroup and that we coordinate, and that is what Europe must do," Foreign Minister Dominique de Villepin told RTL radio.
Zapatero refused Monday to set a date for a possible withdrawal of Spain's 1,300 troops in Iraq, saying only that one would be set after he takes over as prime minister some weeks from now.
"I have said clearly in recent months that, unless there is a change in that the United Nations take control and the occupiers give up political control, the Spanish troops will come back, and the limit for their presence there is June 30," he said.
U.S. authorities said Monday they believe al Qaeda had a role in the Madrid attacks. Police also were investigating a possible link between the bombings in Spain and attacks in Casablanca last year, focusing on a Moroccan arrested in Spain over the weekend, a Moroccan official told The Associated Press.
Investigators have been questioning Jamal Zougam, a Moroccan with suspected ties to an al Qaeda cell leader. Authorities found a video of mujaheddin fighters during a search of his home, according to an indictment reviewed Sunday.
The 700-page indictment names Zougam — one of three Moroccans arrested Saturday in connection with the train bombings — as a follower of Imad Yarkas, who was jailed by Spanish Judge Baltasar Garzon for allegedly helping plan the Sept. 11 attacks in the United States.
Zougam's alleged al Qaeda links strengthen suspicions that the terror group was involved in Thursday's Madrid bombings.
Zougam was not indicted by Garzon, but the indictment, dated Sept. 17, 2003, clearly showed police were keeping an eye on him. His home was searched at least once, turning up a video of mujaheddin fighters in Dagestan, Russia, and telephone numbers of three members of the Madrid al Qaeda cell allegedly led by Yarkas.
In Morocco, a high-ranking official said Zougam, 30, had been under surveillance for months on suspicion of having ties to international terror groups, but faced no formal accusations in Morocco.
The other two arrested Moroccans, Mohamed Bekkali, 31, and Mohamed Chaoui, 34, have no police record in Morocco, said the Moroccan official.
In addition to the three Moroccans, Spanish police have arrested two Indians, whom the interior ministry identified as Vinay Kohly and Suresh Kumar. Two Spaniards of Indian origin have also been detained for questioning.
The five were arrested after a cell phone and prepaid phone card were found in an explosives-filled gym bag on one of the bombed trains.
In Sunday's election, the Socialists defeated the ruling Popular Party, jumping from 125 seats to 164 in the 350-member Congress of Deputies. The conservatives fell from 183 to 148.
The conservatives' defeat was unexpected. Pre-election polls had projected the Popular Party, led by Mariano Rajoy, would win comfortably, and even some exit polls Sunday showed it might win.
But when the ballots were tallied, the Socialists netted 10.9 million to the PP's 9.6 million. Turnout was 77 percent.
Zapatero ran for the first time for prime minister against an entrenched government and won. "That broke a lot of precedents," party campaign manager Jose Blanco said Monday.
The circumstances were exceptional.
The train bombings were followed by nationwide street rallies against the attacks, smaller ones against Aznar's increasingly beleaguered government, and a reported al Qaeda claim of responsibility in a videotape.
The tape raised the possibility that terrorists aligned with Osama bin Laden had changed the course of a national election. Spain's government has insisted its prime suspect in Thursday's rail bombings was the armed Basque separatist group ETA.
Zapatero said Monday he would attempt to form a purely Socialist government, not a coalition with other parties.
Late Sunday, Zapatero started his victory speech by remembering those killed in the railway bombings. "At this moment I think of the lives that were broken by terror on Thursday," he said, then asked the crowd to join him in a minute of silence.
"My most immediate priority will be to fight terrorism," he said. The Spanish Socialist Workers Party ruled from 1982 to 1996 but ran afoul of corruption scandals and was voted out in 1996, when Aznar took power.