The electoral outcome was heavily influenced by the aftermath of the 11 March 2004 Madrid train bombings. For the remaining days before the election, the PP government kept claiming evidence that the terrorist organization ETA was responsible for the bombings. However, it soon became evident that the bombings had not been authored according to ETA's modus operandi, and new evidence pointed out to an Islamist attack with possible links to al-Qaeda. The government was accused of hiding information so as to prevent linking the attack to Islamist groups, as it would have been seen by the Spanish public as a consequence of the PP government taking Spain into the unpopular Iraq War, weakening its chances to being re-elected in the incoming election. Large demonstrations were held across Spain and protests were organized in front of several PP party headquarters the day previous to the election.

In the event, the election result took many by surprise. The PP had been shown to lead all opinion polls conducted before March 11, although its lead over the PSOE had started to narrow as the campaign advanced. The PP government's handling of the 11-M bombings is thought to have accelerated this trend and to have caused a last-minute voter mobilization in favour of the PSOE as a form of protest against the PP. The Socialists ended up leading with an unexpected 5-point margin and a record 11 million votes, the most votes garnered by any party in a Spanish political election up until that date (and only surpassed by PSOE's result of 2008).

The day after the election, Zapatero announced his intention to form a minority PSOE government, without a coalition, saying in a radio interview: "the implicit mandate of the people is for us to form a minority government negotiating accords on each issue with other parliamentary groups". Two minor left-wing parties, Republican Left of Catalonia (ERC) and IU, immediately announced their intention to support Zapatero's government. On April 16, 2004, Zapatero got the approval of the outright majority of the new Congress, with 183 out of 350 members voting for him, and became the Prime Minister of Spain the next day.[1]

For the Congress of Deputies, 348 seats were elected using the D'Hondt method and a closed listproportional representation, with a threshold of 3 per 100 of valid votes—which included blank ballots—being applied in each constituency. Parties not reaching the threshold were not taken into consideration for seat distribution. Additionally, the use of the D'Hondt method might result in an effective threshold over three percent, dependant on the district magnitude.[4] Seats were allocated to constituencies, corresponding to the provinces of Spain. Each constituency was entitled to an initial minimum of two seats, with the remaining 248 allocated among the constituencies in proportion to their populations. Ceuta and Melilla were allocated the two remaining seats, which were elected using plurality voting.[2][5][6][7]

For the Senate, 208 seats were elected using an open listpartial block voting, with electors voting for individual candidates instead of parties. In constituencies electing four seats, electors could vote for up to three candidates; in those with two or three seats, for up to two candidates; and for one candidate in single-member districts. Each of the 47 peninsular provinces was allocated four seats, whereas for insular provinces, such as the Balearic and Canary Islands, districts were the islands themselves, with the larger—Majorca, Gran Canaria and Tenerife—being allocated three seats each, and the smaller—Menorca, Ibiza-Formentera, Fuerteventura, La Gomera, El Hierro, Lanzarote and La Palma—one each. Ceuta and Melilla elected two seats each. Additionally, autonomous communities could appoint at least one senator each and were entitled to one additional senator per each million inhabitants.[2][5][6][7]

The electoral law provided that parties, federations, coalitions and groupings of electors were allowed to present lists of candidates. However, groupings of electors were required to secure at least the signature of 1 per 100 of the electors entered in electoral register of the constituency for which they were seeking election. Electors were barred from signing for more than one list of candidates. Concurrently, parties and federations intending to enter in coalition to take part jointly at an election were required to inform the relevant Electoral Commission within ten days from the election call.[5][7]

Articles 68 and 69 of the Spanish Constitution of 1978 established that the term of each House of the Cortes Generales—the Congress and the Senate—expired four years from the date of their previous election, unless they were dissolved earlier. Article 42 of the General Electoral System Law of 1985 required for the election Decree to be issued no later than the twenty-fifth day prior to the date of expiry of the Cortes in the event that the Prime Minister did not make use of his prerogative of early dissolution. The Decree was to be published on the following day in the Official State Gazette, with election day taking place on the fifty-fourth day from publication. The previous election was held on 12 March 2000, which meant that the legislature's term would expire on 12 March 2004. The election Decree was required to be published no later than 17 February 2004, with the election taking place on the fifty-fourth day from publication, setting the latest possible election date for the Cortes Generales at Sunday, 11 April 2004.[5][7]

Article 115 of the Constitution granted the Prime Minister the prerogative to dissolve both Houses at any given time—either jointly or separately—and call a snap election, provided that no motion of no confidence was in process, no state of emergency under Article 116 was in force and that dissolution did not occur before one year had elapsed since the previous one. Additionally, under Article 99 both Houses were to be dissolved and a new election called if an investiture process failed to elect a Prime Minister within a two-month period from the first ballot.[2][6] While there was no constitutional requirement—aside from Article 99—for simultaneous elections for the Congress and the Senate, there were no precedents for separate elections, with governments having long preferred that elections for the two Houses take place simultaneously.