A machine gun, two handguns and 3kg of explosives were found at a flat raided by police who foiled an "imminent" attack in France.

Officers arrested two Frenchmen who had met in prison and were known to have turned to radical Islam, prosecutor Francois Molins said.

An Islamic State flag and jihadist propaganda had previously been found at one of the men's homes, and the other was thought to be linked to a Belgian jihadist cell.

Image: Police leave the scene after the raid in Marseille

The pair - named in reports as Mahiedine Merabet, 29, and 23-year-old Clement Baur - were detained in the southern city of Marseille over suspected terror links as the country prepares to vote on Sunday in the first round of its presidential election.

Police had been hunting the pair for some time, and photos of the two were given to presidential candidates' security last week.


Image: French soldiers, policemen and firefighter vehicles at the site of the arrest

French interior minister Matthias Fekl said the "radicalised" suspects were preparing to strike Marseille "in the next few days".

"The men are suspected of wanting to commit, in an imminent way, a violent action on the eve of the French presidential election," Mr Fekl told reporters.

"Everything has been put in place to ensure the security of this big event for our democracy and our republic. The security forces are mobilised everywhere across France to ensure the security of French people and to ensure the presidential campaign goes smoothly," he added.

:: What you need to know about the French elections

Image: Le Pen and Macron lead in opinion polls for the first round of the election on April 23

France has remained on high alert since a string of terror attacks that began in 2015, which have killed more than 230 people.

The country goes to the polls to choose a new president on 23 April, with a second round of voting due on 7 May.

:: Macron denies elitism as candidates bid for last votes

:: Le Pen rallies supporters with border promise

Anti-EU, anti-immigration candidate Marine Le Pen has sought to cast herself as the best defender of France against the threat of fresh attacks.

Emmanuel Macron, the 39-year-old pro-European candidate, appears to have the best chance of beating Le Pen in a run-off.

Radical leftist candidate Jean-Luc Melenchon and conservative ex-premier Francois Fillon have also gained ground, transforming the election into a tight four-way race.