The suspects, Mahiedine Merabet, 29 and Clement Baur, 23, were detained under arrest warrants for terrorist criminal association.
Paris: French police thwarted an imminent "terror attack" and arrested two suspected radicals on Tuesday in the southern port city of Marseille, the interior minister said just days before the first round of France's presidential election.
The two men allegedly "intended to commit an attack on French soil in the very short term, which is to say in coming days," Interior Minister Matthias Fekl said during a brief news conference.
France votes on Sunday in the first round of its two-stage election. Extra safety measures are being put in place for the balloting after the extremist attacks in the country that have made security one of the major issues of the presidential campaign.
The men, both French, are "suspected of wanting to commit, in an imminent way, a violent action on the eve of the French presidential election," the minister said.
Fekl gave no details about potential targets or motives. The suspects, Mahiedine Merabet, 29 and Clement Baur, 23, were both detained under arrest warrants for terrorist criminal association, according to a police document obtained by The Associated Press.
President Francois Hollande hailed the "remarkable" arrests and the work of police.
Agents from the French domestic security agency, backed by elite police units, conducted the arrests. Searches are also underway, Fekl said.
France's fight against home-grown and overseas Islamic extremism has been one of the main campaign topics for presidential candidates.
Candidates on the right have been especially vocal, seeking to appeal to voters traumatized by Islamic State group-inspired attacks that have killed at least 235 people in France since January 2015, by far the largest casualty rate of any Western country.
With the terror threat "higher than ever," Fekl said "everything is being done" to secure the election, the candidates, their election headquarters and rallies.
He said more than 50,000 police, gendarmes and soldiers will be deployed in France and its overseas territories on Sunday and for the decisive second-round vote on May 7.