Go read this article from the Economist on the PP and its problems--specifically, its need to move toward the center. I've been saying this for at least eighteen months, and this article has come out now that Rajoy really is trying to position himself closer to the center. Here's an excerpt:
National politics in Spain is a two-party affair. If the PP is to oust the Socialist prime minister, José Luis Rodríguez Zapatero, it needs voters in the centre. But it shows no sign of wooing them. Instead, it angrily opposes all government initiatives, from gay marriage to Catalan devolution, to peace talks with the Basque terrorist group, ETA. Like Britain's Conservative Party in the past, it risks seeming to be a “nasty” party...Yet at the root of the PP's troubles is its inability to shake off the trauma of its loss of power. This came three days after Muslim terrorists killed 191 people on Madrid trains. The day before the vote, angry protesters came out on the streets demanding to know who was to blame. Was it ETA, as Mr Aznar insisted, or Islamists? As the evidence leant towards the second, voters who had been ready to vote for the PP shifted.
Correction: The Aznar government admitted it might not have been ETA late on the very day of the bombing, and by election day official announcements made it clear that Islamic terrorists were guilty. I'm not so sure that many PP voters switched parties; I think what happened was that many usual abstainers came out and voted against the PP.