At least 14 suspected members of a cell that recruited would-be fighters for the Islamic State in Iraq and the Levant (ISIL) were arrested Tuesday in a joint operation in Morocco and Spain, authorities said.

Morocco's Interior Ministry said 13 people were arrested in raids in several cities across the country, including Nador and Hoceima on the Mediterranean coast close to the Spanish enclave of Melilla, as well as Fez and Casablanca. One of those detained had previously been arrested under the country's anti-terror law.

A Spanish Interior Ministry statement said one person was arrested in the central town of San Martin de la Vega, just southeast of Madrid. It said the members of the group, whose leader was among those detained, maintained close contact with each other in Melilla.

Both ministries said the network was aimed at recruiting men to fight with ISIL in Syria and Iraq and also to carry out ISIL-related missions in Morocco and Spain.

Moroccan and Spanish authorities have previously carried out joint operations focused on the two Spanish enclaves in North Africa, Melilla and Ceuta, and the surrounding Moroccan cities.

A heavily armed Moroccan, originally form the northern city of Tetouan, was subdued on a high-speed passenger train on Friday as it passed through Belgium, but there were no indications the raids were connected to that case.

Morocco is one of the main suppliers of fighters to ISIL. In July, Interior Minister Mohammed Hassad said 1,350 Moroccans had joined the group, of which 286 had been killed.

He added that 30 networks have been dismantled in the past two years, 12 of those just in the past six months.

Spanish police have arrested some 50 suspected fighters and recruiters so far this year.

Interior Minister Jorge Fernandez Diaz said last month that 126 people had left Spain to join ISIL in recent years. Of these, he said 25 had been killed and 61 remained abroad. He said that of the 25 known to have returned, 15 were in prison and 10 were free, and there are arrest warrants outstanding for 15 others whose whereabouts are unknown.

The Associated Press