They were able to track down the gang after propaganda messages were found online, leading to Spanish police arresting four people on suspicion of spreading extremism online and indoctrinating recruits, the Daily Express reported.
Police said the cell, operating in Gibralter on the south coast of Spain, was trying to recruit radicals and persuade them to attack holiday resorts in Costa Del Sol, a region popular with British holidaymakers.
Police arrested three Moroccans and one Spaniard who are allegedly part of an organised cell spreading extremist material online.
Video footage of their capture has also been released by the Spanish Guardia Civil police force, the daily said.
More From This Section
The group have allegedly made contact with hundreds of people, selecting potential members to be radicalised and indoctrinated using different webpages and instant messaging apps to communicate.
Spain remains on high alert after the anti-terror level was raised in June 2015.
The Spanish Guardia Civil have intensified their investigations into propaganda and recruitment groups.