Updated

Until March 11, Prime Minister Jose Maria Aznar (search) had relished the prospect of a glowing legacy, with economic growth, political stability and even a bit of global clout.

Instead, as he watches Sunday's general elections from the sidelines, his country is traumatized by its worst terrorist attack ever and the gnawing fear that it may face a shadowy, ruthless new enemy — Islamic extremists.

On Saturday, 5,000 protesters gathered outside Aznar's party headquarters, accusing him of provoking the Madrid rail bombings by backing the Iraq war — and then lying by pointing the finger at Basque separatists. Aznar's government announced the arrest of three Moroccans and two Indians in the attacks, the strongest evidence yet of an Islamic link.

Whoever is behind the 10 blasts that killed at least 200 people and wounded nearly 1,500 — Al Qaeda (search) or the armed Basque separatist group ETA — Aznar will bow out haunted by what is surely the worst day in his life.

When he went before reporters after Thursday's blasts, Aznar looked devastated, his face pale and voice weak.

Campaigning for his hand-picked successor Mariano Rajoy (search), Aznar had touted his government's accomplishments — eight years of steady and sometimes robust economic growth, a degree of global prominence for a long-ignored country and major progress in his all-out battle against ETA.

Aznar's Popular Party had been favored to win Sunday's election over the opposition Socialists and gain a third straight term in power. Only its majority in Parliament is in doubt. But Saturday's dramatic news of a possible Islamic link in the attacks could mean punishment for the ruling party at the polls.

Indeed, only last Sunday, Aznar signed a front-page opinion piece in the newspaper El Mundo in which he sounded triumphant.

"I am leaving pleased with my country and honestly satisfied to leave it, I think, better off than I found it," Aznar wrote.

A few days before that, he was quoted as saying this to the London Times: "Fortunately, ETA is weaker than ever, and I have no doubt about its final defeat. I say this quite serenely."

And last May, after Islamic suicide bombers attacked a Spanish restaurant in Casablanca, Morocco, killing 33 people, Aznar curtly dismissed suggestions that the carnage was in retaliation for his support of the Iraq war.

Aznar's government had insisted ETA was its prime suspect in the Madrid rail blasts, even though the technique — nearly simultaneous bombs aimed to kill many civilians — does not fit with ETA pattern of single-target attacks often with advance warning.

ETA denied responsibility for the attacks.

Analysts commenting on Aznar's record before the blasts agreed he deserved credit for placing Spain on the map and transforming it from a snoozing geopolitical backwater into a country with first-world interests and opinions and the nerve to defend them.

He gambled on Iraq, backing the war in the face of furious opposition at home.

For much of the world, Aznar came out of nowhere to stand next to President Bush and British Prime Minister Tony Blair (search) in the Azores summit (search) on the eve of the invasion. For Aznar, it was essentially about fighting terrorism, an obsession for a man who walked away shaken but alive after a Basque separatist car bombing in 1995.

In a word, Aznar said during the war, Spain could no longer be just "simpatico," which means friendly or fun.

"We cannot continue to be ruled by cliches, or let cliches get in the way of our work," Aznar said April 7 in a speech to Spanish business leaders.