The arrests in the southeastern city of Teulada and the enclave of Ceuta in northern Morocco came a day after Spanish police detained four men with alleged links to people involved in the Brussels airport and metro attacks last year.
The 46-year-old Egyptian man arrested in Teulada is suspected of having “facilitated the return of terrorists belonging to Daesh (IS) who had decided to return from Syria and Iraq,” the interior ministry said in a statement.
He is suspected of providing them with a place to stay and helping with administrative procedures.
He also distributed “documents justifying attacks committed by Daesh” among the Muslim community in his area and on social media networks, the statement said.
Separately, the police said they had arrested a 29-year-old Spaniard in the poor district of El Principe in Ceuta.
— Policía Nacional (@policia) April 26, 2017
Police described him as “a key element in Daesh's recruitment and indoctrination machine.”
They said “he recruited vulnerable young people to progressively radicalise them”, and was suspected of wanting to go to conflict zones himself.
His wife had previously been detained on suspicion of similar propaganda and recruitment activities.
According to the interior ministry, 69 suspected jihadists were arrested in 2016 and another 29 have been held so far this year.
But Spain has seen far fewer citizens travelling abroad to join the ranks of IS than other European countries.
According to the Real Instituto Elcano, a prominent Spanish think tank, about 160 Spain-based “fighters” have left the country for conflict zones, compared with more than a thousand in neighbouring France.