Moroccan man arrested in Mallorca over IS links
The suspect, whose identity was not revealed, was allegedly planning attacks in Spain and other European targets, police said after his arrest on Tuesday.
He was seized in Palma, on the Mediterranean island of Mallorca, for posing "a clear threat to national security".
He promoted recruitment for the militant group over the internet and worked on sending potential fighters abroad, the interior ministry said in a statement.
"The police operation, which meant the rapid neutralisation of a direct threat, remains ongoing," a statement added.
"He sent out radical messages directed towards recruiting new [militants] and promoted and facilitated their journeys to zones of conflict so they could join [IS] ranks.
"He also, in smaller groups and to a more selected audience, directed his efforts towards facilitating the commission of terrorist actions in Spain and other European countries," it added.
At least 19 suspects have been arrested in Spain this year for connection with the militant group.
In February, seven suspects were arrested for allegedly sending guns and explosive materials disguised as humanitarian aid to militants in Syria and Iraq.