PARIS (Reuters) - France said on Monday it had foiled a possible militant attack after detaining seven people, including some who had been in the ranks of Islamic State in Syria.

Slideshow ( 6 images )

The arrests come a year after a state of emergency was imposed to counter a wave of Islamist attacks, and at a sensitive time in France ahead of next spring’s presidential elections where security will be a major theme.

Interior Minister Bernard Cazeneuve said the seven people, of French, Moroccan and Afghan origin aged 29 to 37, were taken into custody on Sunday after an eight-month operation that ended with the DGSI internal intelligence agency laying a trap.

“Yesterday, a terrorist act on our soil that was being prepared for a long time was foiled thanks to the work of the DGSI,” Cazeneuve told reporters.

“The scale of the terrorist threat is enormous and it is not possible to ensure zero risk despite everything we are doing.”

French officials are worried that Islamic State, which is fighting to defend territory it seized in Syria and Iraq, will call on its followers and jihadists returning from the region to increase attacks in the West.

More than 230 people have been killed in attacks on French soil since January, 2015, including 130 in coordinated gun and suicide bomb strikes in Paris in November last year.

A second source said some of those arrested had spent time in the Syria-Iraq region and one of them had been identified after a tip-off from the Portuguese government. Four handguns and a submachine gun were recovered during house searches, the source said.

Two were arrested in the Mediterranean port city of Marseille and four in Strasbourg in the east. Cazeneuve did not say where the seventh was arrested.

The minister gave no information on the target of the planned attack. The mayor of Strasbourg said it appeared the plot had not concerned his city but rather the Paris region.

The source said the plotters were caught after intelligence services leaked information to one of their coordinators - most likely in Syria - that there was a weapons cache in the Paris region. After several months of surveillance the suspects finally approached the cache, the source said.

“Things moved recently because the suspects were determined to act and their cautiousness slipped. They started to make mistakes and got closer to the weapons,” the source said.