Police arrested two men in Marseille Tuesday on suspicion of planning an "imminent" attack, finding guns, explosives and an Islamic State jihadist flag just days before the first round of France's presidential election.
The foiled plot sparked fears that the closing days of the campaign could be a target for extremists ahead of Sunday's vote, the country's most unpredictable election in decades.
Elite police and intelligence agents detained the two Frenchmen -- identified by sources as 23-year-old Clement Baur and Mahiedine Merabet, 29 -- in the Mediterranean port city and Interior Minister Matthias Fekl said they were known to be "radicalised".
While searching the suspects' shared Marseille apartment, authorities uncovered an arsenal including a loaded Uzi submachine gun, two loaded pistols, three kilos (6.5 pounds) of TATP explosives and a homemade grenade as well as the flag of the IS group, Paris prosecutor Francois Molins told reporters.
The men both have criminal records and are suspected of plotting "an imminent, violent act on French soil, though we don't know precisely the day, the target or targets," Molins added.
Merabet was trying to contact IS to pass them "a video pledging allegiance or claiming (an attack)", the prosecutor said, adding both suspects were on a French watchlist of extremists.
A video intercepted last week included images of a newspaper front page that bore the image of a presidential candidate whom Molins did not identify.
Despite officials giving no indication of who the men were targeting, the campaign team of far-right candidate Marine Le Pen linked the arrests to her planned campaign visit to Marseille on Wednesday.
"The fact that the two individuals were arrested in Marseille as Marine Le Pen was preparing to hold a meeting the following day is perhaps not a coincidence," a member of her entourage said.
Photos of the two suspects were distributed last week to the security teams for Le Pen and centrist candidate Emmanuel Macron.
Conservative candidate Francois Fillon was also warned about the danger last week, an aide said.
France remains under a state of emergency after being the repeated target of jihadist attacks that have killed more than 230 people since January 2015.
In the deadliest attack, IS gunmen and suicide bombers slaughtered 130 people in Paris in November 2015.
Candidates have been heavily guarded during the election campaign, but so far there have been few security scares.
- Election race narrowing -
The presidential race has narrowed with just days to go, with the pack closing behind frontrunners Macron and Le Pen.
For weeks, centrist former banker Macron and National Front leader Le Pen have been in front but opinion polls now show any of the four leading candidates could reach the May 7 run-off.
Scandal-plagued Fillon and far-left firebrand Jean-Luc Melenchon have closed the gap dramatically in the last two weeks.
"We have never seen a four-way contest like this in the first round of a presidential election," Frederic Dabi of the Ifop polling institute told AFP.
"There has been a real tightening of the race with four candidates between 19 percent and 23 percent."
Macron and Le Pen are tied on 22-23 percent, with Fillon improving to around 21 percent and Melenchon surging as high as 20 percent in some polls.
With Le Pen expected to reach the second round, polls continue to indicate that whoever faces her will win, although after Brexit and Donald Trump's US presidential election victory, no one is taking anything for granted.
Melenchon has made the most remarkable breakthrough in recent weeks with a far-left programme that includes huge public spending and a pledge to renegotiate all European Union treaties.
But he told supporters Tuesday -- appearing simultaneously in seven towns by hologram, one of this campaign's most innovative gimmicks -- he did not want France to follow Britain out of the bloc.
"Don't believe what they tell you," he said.
- EU fears -
Le Pen wants to pull France out of the eurozone and also foresees a mass renegotiation of EU treaties, sparking fears that a far-right victory, hot on the heels of Brexit, could be fatal for the European bloc.
In contrast to Le Pen, Macron told 20,000 people at a Paris rally Sunday that France's future lay firmly in Europe, albeit one that suited French interests.
"We need Europe, so we will remake it," Macron said.
Polls suggest more than a quarter of voters have yet to decide who they will support.
Former premier Fillon has been hit hard by a "fake jobs" scandal, but voters seem to be warming to his message that he is a safe pair of hands in an election of largely untested candidates.
Fillon has been charged over allegations he gave his wife Penelope a fictional job as his parliamentary assistant for which she earned nearly 680,000 euros ($725,000) in public money.