A total of 183 lawmakers in the 350-seat Congress of Deputies voted for Jose Luis Rodriguez Zapatero, more than a month after his Socialist Party swept to a landslide victory in general elections just days after Spain's worst terrorist attack.
Zapatero's party won 164 seats in the election, 12 short of a majority. On Friday, the Socialist leader managed to close the gap with help from smaller, mainly regional parties holding a total of 19 votes.
A day before his election as prime minister, Zapatero lay out the direction the new government would take in the coming months. Speaking during a parliamentary debate, Zapatero repeated his election promise to withdraw the 1,300 Spanish troops currently deployed in Iraq if the UN does not take control by June 30.
"The situation in Iraq is worsening from day to day," he said. “If the United Nations does not take over political control and the military command in that country, the Spanish troops will come back to be with us,” Zapatero said.
The 43-year-old former lawyer from the Castile region made no secret about his plans for an abrupt change in Spain's Atlanticist policy, a stance which has won him admiration among the Spanish populace.
"We must remove Spain from the Azores photo," Zapatero said, referring to the mid-Atlantic summit in March 2003 (photo) that brought together U.S. President Bush, British Prime Minister Tony Blair an Spanish Prime Minister Jose Maria Aznar on the eve of the Iraq war.
"We must remove Spain from the illegal and unjust war it caused," he stressed.
Intensifying the fight against terror
Zapatero, who takes over a country still reeling from the bloodiest terrorist attacks in recent history that killed 191 people in Madrid last month (photo), made the fight against terrorism the centerpiece of his speech in parliament on Thursday.
"The main objective of the government I preside over will be to wage an all-out war on terrorism, against any terrorism, against all terrorism," Zapatero said.
He vowed to place the country's intelligence and security services under a single, unified command to coordinate the terrorism fight.
"Our security forces will be better equipped, better coordinated and better informed," Zapatero said referring to the security failures that allowed the Madrid train bombings to take place.
Zapatero also said he planned to visit Morocco shortly, as one of his first overseas trips as prime minister.
"Morocco demands and deserves preferential treatment and relations that are tailored to bringing about very close ties. That is what I shall say to the Moroccan authorities during my visit in the coming days," he said.
Several of the 18 people detained in connection with the Madrid bomb attacks are of Moroccan origin.
On the issue of European policy, Zapatero indicated that he planned to pursue a strongly pro-European foreign policy and his government would "do everything possible" to reach agreement on the stalled European constitution by June of this year.
Zapatero added that the European constitution was the "the most stabilizing common element" between the 25 EU members. "What's good for Europe, is also good for Spain," he said.
No to violence against women, yes to gay marriage
Zapatero also announced far-reaching reforms on the home front. He pledged to crack down on violence against women, a scourge which he called Spain's "greatest national disgrace" and to recognize gay marriage.
"The moment has finally arrived to end once and for all the intolerable discrimination which many Spaniards suffer because of their sexual preferences," Zapatero said. "Homosexuals and transsexuals deserve the same public consideration as heterosexuals," he said. "As a result we will modify the Civil Code to recognize their equal right to marriage with the resulting effects on inheritance, labor rights and social security protection."
The new prime minister also promised a 25 percent increase in government spending on education, research and development, affordable housing for low and middle-income families and a simplification of the tax system as part of program to modernize the economy.