A Spanish judge has charged four Algerian men with membership of a terrorist organisation.
The judge said chemicals found in their homes could have been used to make explosives.
Police also found a mobile phone that had been modified in a similar way to phones used as detonators in the Madrid train bombings in March.
The indictment alleges the men were working to support an Islamic militant cell based in France.
The men were originally arrested along with 12 others in January 2003 on suspicion of being part of an Algerian extremist group with links to al-Qaeda.
They were later released, before being re-arrested last month.
From the newsroom of the BBC World Service