Spain's outgoing government paid heavily at the polls for the speed at which it moved to blame the Basque separatist group Eta for the Madrid train bombings.
In the immediate aftermath of the March 11 attacks, Jose Maria Aznar's government insisted that Eta - with its history of blasts timed to coincide with elections - was its prime suspect.
Nearly 200 people have died as a result of the attacks
But evidence was simultaneously emerging of an Islamic link, and the evidence has since hardened up that militants - perhaps with connections to al-Qaeda - might be behind the attacks.
More than a dozen people have been held on various provisional charges in connection with the attacks, including 10 Moroccans, two Indians and two Spaniards - one of Syrian origin.
It was the arrests of five men two days after the blasts that gave the first concrete basis to speculation that Islamic militants were behind the attacks.
The five were detained in connection with a mobile phone which was found inside a bag containing explosives that failed to go off.
Investigators believe mobile phones were used to detonate 10 bombs hidden in backpacks on the four trains which were targeted.
One of the men being held Jamal Zougam, a Moroccan, has been monitored by the Spanish authorities for some time.
He is alleged to have links with a man known as Abu Dahdah - identified in a judicial indictment last Autumn as the suspected leader of an al-Qaeda cell in Spain.
The Moroccan authorities have also been closely involved in the investigation, amid speculation of a connection between the Madrid blasts and those in Casablanca last year.
Forty-five people, including 12 suicide bombers, died in the Casablanca blasts, which the Moroccan authorities blamed on an ultra-conservative Islamist group said to have links with al-Qaeda.
One of the targets was a Spanish cultural centre, where four Spaniards were among the dead.
True or false
The claims of responsibility from Islamic groups have however yet to be authenticated.
A man calling himself Abu Dujan al-Afgani and identifying himself as al-Qaeda's military spokesman in Europe appeared in one videotape to claim the attacks.
However, intelligence services have no record of him.
Another group, the Abu Hafs al-Masri Brigades, linked to al-Qaeda, sent statements to a London-based Arab newspaper saying it carried out the attacks.
The group also warned that its "brigades of death" could strike next in Japan, the US, Italy, Britain, Saudi Arabia or Australia.
Spain's troop presence in Iraq may be pulled out
However, US intelligence officials believe the group has little credibility.
But even before the arrests and claims of responsibility, some analysts were already convinced that the bombings bore the hallmarks of al-Qaeda.
The choice of multiple targets in a simultaneous co-ordinated attack is a key feature of an operation by the Islamic militant group.
The attack appears to have been designed to inflict the maximum number of civilian casualties - again consistent with previous al-Qaeda operations.
Al-Qaeda had also threatened revenge on Spain for its government's backing of the US-led invasion of Iraq and its sending of 1,300 troops, which incoming Prime Minister Jose Luis Rodriguez Zapatero has pledged to withdraw.