Zapatero overwhelmed Mariano Rajoy, the handpicked successor of Popular Party retiring leader Jose Maria Aznar, a staunch ally of Bush in the invasion of Iraq.
The upset came just days after 10 terrorist bombs -- possibly planted by al-Qaida linked Islamists -- exploded in Madrid killing about 200 people.
Aznar has supported the Iraq invasion despite wide popular dissent and there was speculation the bombings were a result of the Madrid-U.S. link.
Zapatero has vowed to withdraw the more than 1,000 Spanish troops serving in Iraq.
McClellan refused to link the bombings with the election results, but said the explosions underlined the continuing war against terrorism groups.