Fighters of the Islamic State of Iraq and Syria, or ISIS, stand guard at a checkpoint in the northern Iraq city of Mosul, June 11, 2014. Since Tuesday, ISIS fighters have seized Iraq's second biggest city Mosul and Tikrit, home town of former dictator Saddam Hussein, as well as other towns and cities north of Baghdad. They continued their lightning advance on Thursday, moving into towns just an hour's drive from the capital. Reuters

A former Guantanamo Bay detainee was among eight men arrested for allegedly recruiting militants to fight for the Islamic State of Iraq and Syria, or ISIS, the Sunni militant group battling government forces in Iraq. It was unclear if the recruits were in Iraq, but Spain’s interior ministry said they were sent to the Middle East.

“The main leader of this [recruitment] cell lived in Spain after having spent time at the [U.S. detention center] in Guantanamo, having been arrested in Afghanistan in 2001,” the ministry said in a statement Monday, according to Reuters. His name was not released.

A dozen buildings in Madrid were going to be searched in connection with the arrests, the ministry said.

ISIS has hurled Iraq into chaos after attacking government troops in an attempt to carve out a caliphate in Syria and Iraq based on Sunni Muslim ideals. The group has seized large swaths of northern and north-central Iraq, and by Sunday, the fighting got closer to Baghdad, prompting the U.S. to decide to evacuate 5,300 employees from its embassy in the capital.

Spain has, in the past, arrested militants who recruited fighters on the Spanish mainland and the country’s territories of Ceuta and Melilla in northern Africa, to be sent to Syria and other areas.