Authorities in Spain suspect the men had been in contact with “at least one” of two alleged Islamic State extremists arrested in Salzburg, Austria shortly after the attacks in Paris in November 2015 that killed 130 people, the interior ministry said.
Austrian police arrested the pair, Algerian Adel Haddadi and Pakistani Mohamad Usman, on December 10th at a migrant centre in Salzburg over their suspected links to the cell that carried out the massacre.
Investigators believe Haddadi and Usman travelled to the Greek island of Leros on October 3rd on the same boat as two people, thought to be Iraqi, who blew themselves up outside the Stade de France stadium during the attacks.
But Haddadi and Usman were detained by Greek authorities for 25 days because they had fake Syrian passports.
Once released, they followed the main migrant trail and made it to Salzburg at the end of November.
The four men arrested in Spain on Monday are suspected of involvement with the ring that organised Haddadi and Usman's arrival in Europe, the interior ministry in Madrid said in a statement.
Spanish authorities are now trying to determine if the four men, whose identities were not released, were also part of the Islamic State group.
After the Paris attacks, Spain stepped up its investigations into suspected illegal immigration rings “to prevent them from being used by terrorists to infiltrate Europe,” the interior ministry said.
So far this year Spanish authorities have detained 61 suspected jihadists in Spain.