The bombings would have been horrific and chillingly similar to the last one that Islamic terrorists inflicted on Spain: multiple backpack explosives detonated by suicide attackers on Barcelona's tourist-choked subway, just weeks before a general election.
But the alleged plot by nine Pakistanis and an Indian national never took place, and now the way it was thwarted is causing a controversy — with France reportedly angry over the outing of one of its secret agents.
After police and security forces arrested the men and seized detonators and other bomb-making material in Jan. 19 raids on a mosque and four other homes, a judge and Spain's attorney general said they had stopped an imminent attack.
Spanish authorities quickly backed off that, acknowledging that the amount of explosives seized was very small — just over an ounce. Interior Minister Alfredo Perez Rubalcaba admitted that "there are doubts" about how close the cell was to acting.
What does appear clear, however, is that the case has created problems between Spanish and French intelligence services — normally adept at quietly working together on cross-border operations against the Basque militant group ETA.
Spain's El Pais newspaper reported last week that the Barcelona plot was uncovered thanks to a French secret agent identified as F-1, who arrived on a train from France to join the cell. His name has been kept secret, but the fact that a newspaper got the story has caused consternation in Paris and embarrassment in Madrid.
A French security official, speaking on condition of anonymity because of the sensitivity of the intelligence, told The Associated Press that counterterrorism teams in France had expressed "astonishment" about the way Spanish authorities had handled the case.
The official would not comment on separate reports from Spain that the French were furious that the use of their agent appeared in Spanish media, and that authorities had decided to make him a "protected witness."
While that status kept F-1's name secret, it was the first revelation that an agent existed at all and effectively telegraphed his identity to the members of the alleged terrorist group who had thought he was one of them.
'Sometimes there are leaks'
The French even reportedly questioned whether authorities in Barcelona had to act when they did, jeopardizing other investigations elsewhere.
Another French official, without confirming the agent's outing, played down the case, saying "sometimes there are leaks." The official indicated France would continue to share intelligence with Spain. He too spoke on condition of anonymity because of the sensitivity of the intelligence.
There has been speculation Spanish authorities may have acted hastily because the country is just weeks away from March 9 national elections.
On March 11, 2004, a group of mostly North African Islamic militants angered by Spain's involvement in Iraq carried out devastating bombings on commuter trains in Madrid just before a national vote. The blasts killed 191 people and injured more than 1,800 others.
Three days later, Spaniards ousted the conservative party of Jose Maria Aznar, a staunch Washington ally who had backed the U.S.-led war. The man swept into power, Prime Minister Jose Luis Rodriguez Zapatero, is locked in a tight re-election contest.
Rubalcaba, the interior minister, acknowledged the explosives found in Barcelona were probably for training purposes — not an attack — but defended the timing of the police raids, saying: "From the moment a cell like this decides to attack to when it actually does, not much time goes by."
But the aftermath has left Spain looking bad, repaying France for its help on a major terror plot by apparently blowing the cover of its agents. Spanish authorities would not comment on the matter.
On the rabbit-warren streets of Barcelona's heavily Pakistani Raval neighborhood, a poor area of Asian restaurants and mosques far off the tourist path, there was anger and defensiveness about the alleged plot.
Two men arrested in the raids but later released told AP the group was not planning anything.
Rafqat Ali, a 27-year-old construction worker, accused police of beating him and holding him in a darkened cell for hours.
"We are not terrorists. None of us are. We are just immigrants from Pakistan who work and go to the mosque," said the other released man, Sheikh Saeed Akhtar, a 52-year-old shop worker. He said police found cables and batteries at the mosque "because they are doing building work there. We have no interest in these Taliban."
The son of jailed 63-year-old suspect Mohammad Ayud, whom police accuse of being one of the ideological leaders behind the attack, said his father was innocent.
"My father has done nothing. We never speak of things like terrorism. He has been here in Spain for 40 years and is known in the community. We came here to make a new life," said Nadeem Ayud, 40, owner of a pastry shop. "I know most of the people who were arrested, and none of them are terrorists. They are normal people who go to the mosque. It seems people prefer lies than the truth."
Secret agent: Group planned several attacks
F-1 said the group was operating on orders from Baitullah Mehsud, the militant atop the newly formed Taliban Movement of Pakistan, who is blamed for the Dec. 27 assassination of former Pakistani Prime Minister Benazir Bhutto.
In a conversation with another cell member, F-1 asked: "Why are we going to attack the metro?'" according to El Pais
The unidentified member replied: "Because if we attack the metro, the emergency services cannot get there. One person will wear a backpack, another one will detonate the bomb from a distance."
He added: "If the first (attack) does not work, we will mount a second and a third in Spain."
F-1 said the group had plans to strike not only in Barcelona, but also in Germany, France and Portugal, but none of those operations appeared to be developed. Leonel de Carvalho, head of Portugal's Security Coordination Office, said reports of a planned attack in Portugal were "mere speculation."
At a court hearing in Madrid, prosecuting judge Ismael Moreno identified the three alleged suicide bombers as Mohamed Shoaib, Mehmooh Khalib and Imran Cheema, who arrived in Barcelona from Pakistan between October and mid-January.
He said all were members of Tablighi Jamaat, an Islamic group that Moreno accused of promoting "indiscriminate" violence for political ends.
The alleged ideologues of the plot were named in court as Maroof Ahmed Mirza, 38, and the elder Ayud. Others jailed were named as Mohamed Tarik, Qadeer Malik, Hafeez Ahmed, Roshan Jamal Khan and Shaib Iqbal.