Spain's interior ministry said that had arrested two men of Moroccan origin who were working together on plans to carry out a terrorist attack.
One of the men had recently travelled to Turkey in an attempt to cross the border into Syria to join the so-called Islamic State in order to receive training before returning to Europe to carry out an attack.
“He'd made plans to secretly travel to the Syrian border, make contact with Daesh who would transfer him to a confict zone,” said the statement released by the Interior Ministry.
“Once there he planned to undergo intense training in weapons and explosives with the aim of returning to Europe to carry out terrorist actions.”
But the man was arrested by Turkish police before crossing the border and on his release was returned to Spain where he continued to conspire with the other detained man to carry out his plan.
“Both men shared the same jihadist principles,” said the statement.
The men were detained in the cities of Valladolid, northern Spain and Murcia in the south.