Spanish and Moroccan police on Tuesday detained four people suspected of recruiting militants for the Islamic State group (IS), one of whom was a former Guantanamo prisoner who received military training in Afghanistan.
Three Spaniards were arrested in Spain's North African enclave city of Ceuta while a Moroccan was arrested in the Moroccan border town of Farkhana, next to Melilla, Spain's other North African enclave, statements from the two nations' interior ministries said.
One of those detained in Ceuta was a former Guantanamo detainee who was not named by Spanish authorities but described as "a leader who was trained in handling weapons, explosives and in military tactics."
After being captured in 2002 and held in Guantanamo, he was returned to Spain in 2004, said Spanish Interior Minister Jorge Fernandez Diaz.
Another suspect was the brother of a fighter who blew himself up during an attack in Syria and "was inclined to do the same thing," said the minister.
Spanish authorities said the suspects were "willing to commit terrorist acts on Spanish soil," adding they had allegedly made contacts to acquire weapons and substances used to make explosives.
Police said the main aim of the cell was to recruit people from Ceuta for IS, particularly minors.
It had put in place strict measures to avoid being caught - their meetings were held at dawn, telephone conversations were banned and messages encrypted.
Spain was the victim of one of the deadliest attack ever committed in Europe in March 2004 when train bombings killed 191 people in Madrid.
So far however it counts under 200 Spanish fighters within IS ranks, far fewer than neighbouring France.
Agencies contributed to this report