The governing People's Party (PP) was led into the campaign by Mariano Rajoy, successor to outgoing Prime MinisterJosé María Aznar. The election result took many by surprise, as polling leading up to the day of the election had shown the People's Party under leader Rajoy to be consistently ahead. The electoral outcome was heavily influenced by the 11 March 2004 Madrid train bombings and the PP government's handling of the attacks (maintaining the theory of ETA's responsibility even when evidence pointed to Islamist extremist groups), which resulted in large demonstrations on the days before the election.
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.
Elections to the Senate take place under a limited vote system. Each of the 47 peninsular districts (the provinces) is assigned 4 seats. In Baleares and Canarias, districts are the islands themselves, with the larger — Mallorca, Gran Canaria, and Tenerife — being assigned 3 seats each, and the smaller — Menorca, Ibiza-Formentera, Fuerteventura, Gomera, Hierro, Lanzarote and La Palma — one each. Ceuta and Melilla are assigned 2 seats each, for a total of 208 directly elected seats. In districts electing 4 seats, electors may vote for up to 3 candidates; in those with 2 or 3 seats, for up to 2 candidates; and for 1 candidate in single member constituencies. Electors vote for individual candidates: those attaining the largest number of votes in each district are elected for a 4-year term of office.
In addition, the legislative assemblies of the self-governing or autonomous communities into which the provinces of Spain are grouped are entitled to appoint at least one senator each, as well as one senator for every million inhabitants, adding up a variable number of appointed seats to the directly-elected 208 senators.
Under Article 68 of the Spanish constitution, the boundaries of the electoral districts must be the same as the provinces of Spain and, under Article 141, this can only be altered with the approval of Congress.
The apportionment of seats to provinces follows the largest remainder method over the resident population ("Padrón") with a minimum of two seats (Art. 162 of the Electoral Law).
Dual membership of both chambers of the Cortes or of the Cortes and regional assemblies is prohibited, meaning that candidates must resign from regional assemblies if elected. Active judges, magistrates, public defenders, serving military personnel, active police officers and members of constitutional and electoral tribunals are also ineligible, as well as CEOs or equivalent leaders of state monopolies and public bodies, such as the Spanish state broadcaster RTVE. Additionally, under the Political Parties Law, June 2002, parties and individual candidates may be prevented from standing by the Spanish Supreme Court (Tribunal Supremo), if they are judicially perceived to discriminate against people on the basis of ideology, religion, beliefs, nationality, race, gender or sexual orientation, foment or organise violence as a means of achieving political objectives or support or compliment the actions of "terrorist organisations".
Parties and coalitions of different parties which have registered with the Electoral Commission can present lists of candidates. Groups of electors which have not registered with the commission can also present lists, provided that they obtain the signatures of 1% of registered electors in a particular district.
The Spanish Senate at the time of the 2004 election was composed by 208 directly-elected seats and 51 seats appointed by the regional parliaments of the autonomous communities when a new Parliament resulting from a regional election convenes. The appointment process of these seats depended on the political composition of those regional assemblies, and as such, it could change each time regional elections were held. A summary of the Senate composition evolution throughout the 2004−2008 legislature can be found in the table below, showing changes due to seat appointment variation as a result of regional elections.