An Islamic militant cell broken up over the weekend had planned a suicide attack in Barcelona, a Spanish judge said Wednesday.
He ordered 10 suspects jailed pending further investigation and freed two others.
Judge Ismael Moreno of the National Court made the announcement after questioning the 12 suspects for seven hours.
Police detained 14 people in Saturday's raids in Barcelona — 12 Pakistanis and two Indians — but authorities later released two of them without charge, the National Court said. The nationalities of those freed were not made public.
Arrests made in Islamic community
Interior Minister Alfredo Perez Rubalcaba said that during the raids, police also seized materials that could be used to make bombs.
The suspects were arrested in Barcelona's Raval neighborhood, home to many Arabic-speaking and Muslim immigrants.
Europe's worst Islamic-linked terror attack took place in Madrid on March 11, 2004, when bombs went off in four trains, killing 191 people. Last year, 21 suspects were convicted of terrorism and other charges in the bombings.