Eight people have been arrested on suspicion of recruiting fighters for the militant group ISIS which is waging war in Iraq.
The cell had helped to send recruits through to the Middle East where they would join Isis, the Interior Ministry said in a statement.
“The main leader of this [recruitment] cell lived in Spain after having spent time at the [US detention centre] in Guantánamo, having been arrested in Afghanistan in 2001,” the statement read.
He is believed to be a national of Morocco who was released in Spain in 2005 due to lack of evidence against him.
One of the men is believed to be from Spain, another from Argentina and the rest from Morocco.
The arrests were made in Madrid after pre-dawn raids on 12 addresses.
Isis has claimed large parts of Iraq in a lightning campaign that has sent thousands of civilians fleeing for safety.
It aims to establish a caliphate on both sides of the Syria-Iraqi frontier based on strict medieval Sunni Muslim precepts.
In the past two years several dozen people have been apprehended – both on the Spanish mainland and in the country’s enclaves Ceuta and Melilla in northern Africa – accused of recruiting and training Islamist fighters to send to Syria as well as to militant groups in Libya and Mali.