The following lists events that happened during 2004 in Spain.
- March 11 - Ten bombs explode on four trains in Madrid, leaving 191 dead and over 1000 injured.
- March 12 - Millions of people pack rainswept streets across Spain in protest against the recent Madrid bombings.
- March 14 - A general election is held in Spain.
- March 14 - Spanish police receives a videotape where a man identifying himself as an al-Qaeda spokesman says the organisation claims responsibility for the attack, according to an announcement from the country's interior minister. The authenticity of the video has not been verified. The al-Qaeda claim overshadows voting in the general election.
- March 15 - Newly elected Spanish Prime Minister José Luis Rodríguez Zapatero announces his government's opposition to the invasion and continued occupation of Iraq and his intention to withdraw Spanish troops from Iraq by June 30, unless they are part of a U.N. force.
- March 16 - Spanish police identify six Moroccans suspected to have carried out the Madrid attacks. Five of the suspects are still at large but one is in custody.
- March 29 - Spain is reported to be considering doubling her number of troops stationed in Afghanistan.
- April 2 - The Spanish government discloses that a powerful bomb has been discovered on the high-speed AVE railway line between Madrid and Seville.
- April 3 - At least three persons suspected in involvement in the March 11, 2004 Madrid bombings blow themselves up in an apartment building in the Madrid suburb Leganés as police officers try to arrest them. Besides the suspects, one police officer is killed and 11 injured.
- April 4 - Serhane ben Abdelmajid Farkhet (alias "The Tunisian") is suspected of dying in the April 3 Madrid explosion (along with three other suspects). Spanish Interior Minister Angel Acebes announces that the ringleader of the March 11, 2004 Madrid bombings is dead. 200 detonators and 22 pounds of dynamite were found "in the apartment where the four terrorists blew themselves up as police closed in", Acebes said.
- April 17 - Socialist Party leader José Luis Rodríguez Zapatero is sworn in as Spain's prime minister.