Police in France investigating a suspected 'bomb factory' near Paris believe that the three men arrested in connection with it were preparing attacks and had made calls to Syria, a French minister said.
Ingredients to make an explosive known as TATP, commonly used by the so-called Islamic State militant group, were discovered in the apartment in the Parisian suburb of Villejuif yesterday, as well as gas canisters and electrical wiring.
Anti-terror police launched raids following a tip-off from someone who works in the building.
He has been praised for his "citizen's reflex" for reporting suspicious activity.
France’s Interior Minister Gerard Collomb said the men in custody "were involved in terrorism."
"We've seen that there were calls exchanged" with someone in the war-zone in Syria, Mr Collomb told a radio station in France.
The men have denied they were preparing attacks, claiming they were planning a string of robberies in which the explosives would be used to blow up bank cash machines, Mr Collomb said.
Some of the extremists behind the violence in Spain - mostly Moroccan nationals who were also preparing bombs made with TATP - visited Paris on August 11 and 12, about a week before the attacks in Spain.
Mr Collomb said "it was possible there were links but honestly I don't know."
The Spain attackers stayed in a hotel in the Parisian suburb of Malakoff, a short drive from where the suspected bomb factory was discovered yesterday.
After buying a camera and leaving their hotel, Mr Collomb said the Spain jihadists "spent a long time in front of the Eiffel Tower... We have it all from their phone data."
France has been under a state of emergency since IS gunmen launched a series of simultaneous raids on bars, the national stadium and the Bataclan concert hall in Paris in November 2015, leaving 130 people dead.
Since those atrocities and a truck attack in Nice in July 2016 that killed 86, France has suffered a string of smaller assaults mainly targeting security forces.