Spain's interior ministry said police detained a Moroccan man with Dutch identity documents in the northwestern city of Figueres suspected of belonging to IS who recently returned to Spain from Turkey.
The authorities are investigating whether his return “was motivated by a desire to carry out some sort of action in Europe,” the ministry said in a statement.
The ministry said Spanish police were able to locate the man thanks to the help of Dutch authorities and of the intelligence services of several unnamed countries.
“Investigators are currently trying to determine the degree of radicalisation of the detainee, his possible links in Europe, the activities he has been carrying out for Daesh and what his purpose was since his arrival in Spain,” the statement said, using an Arabic acronym for IS.
In a separate operation, police detained two Spanish men who were part of a group “that had reached a very high level of determination to carry out terrorist activities”.
The group was “fully aligned with the strategy of the terrorist organisation Daesh,” the ministry said in a separate statement.
Police seized a long gun and three knives during searches of six houses carried out as part of the operation in Ceuta, the tiny Spanish territory bordered by Morocco on one side and the Mediterranean Sea.
Meanwhile, Hungarian authorities said they arrested two young women from France and Belgium allegedly seeking to join IS in Syria.
The Belgian, 18, and the French national, 19, were trying to cross into Serbia early Friday, a police spokesperson told Hungarian news agency MTI. The women, who were not named, were travelling on a bus from Vienna to Sofia from where they planned to reach Syria and join IS.
They were subject to warrants issued for previous “acts in connection with terrorism,” Gyorgy Bakondi, Hungarian Prime Minister Viktor Orban's chief security advisor, told public television. No further details were released.
Spanish police have arrested 181 people accused of connections to Islamist militant groups since 2015 when Spain raised its terror alert level to four on a scale of five following deadly attacks in France, Tunisia and Kuwait.
It is the highest alert level since Al-Qaeda-inspired bombers blew up four packed commuter trains and killed 191 people in Madrid on March 11, 2004.
Spain has been mentioned on extremist websites as a possible attack target for historical reasons, given much of its territory was under Muslim rule from 711 to 1492.