Get breaking news alerts and special reports. The news and stories that matter, delivered weekday mornings.

PARIS — French officials say they have foiled an "imminent and violent attack" on the eve of pivotal presidential elections, arresting two men in the southern port city of Marseilles on Tuesday morning.

Security officers searching the homes in connection with the arrests found "a massive quantity of explosives ... and containers of products such as acetone to prepare the explosive," according to Michele Azulé, a spokeswoman for the Marseilles mayor's office.

"Many weapons were also seized," she added.

Let our news meet your inbox. The news and stories that matters, delivered weekday mornings. This site is protected by recaptcha

France goes to the polls to choose a new president on April 23 and on May 7 in a two-stage election. At a news conference, Paris prosecutor François Molins did not specify whether the election was a target, but said the suspects were plotting “a violent action of imminent nature on French territory.”

French police raided addresses in Marseilles on Tuesday after two were arrested on suspicion of planning to carry out an "imminent and violent attack" ahead of the first round of the presidential election. Philippe Laurenson / Reuters

France's Interior Minister Matthias Fekl said the pair, who police said were seized in the southern port city a few moments apart from each other, were radicalized French nationals aged 24 and 30.

"These two radicalized men ... intended to commit in the very short-term — by that I mean in the coming days — an attack on French soil," Fekl said at a news conference.

The men, Maehiedine M. and Clement B., are both French and had been known to French authorities, Molins said. French intelligence officials put them on a watch list, but lost track of them, he said. Authorities believe the two met in 2015, when they spent two months in prison in the northern city of Lille.

National security is a burning issue for many in France after attacks by militant Islamists across the country have killed more than 230 people over the past two years.

With the country still under a state of emergency, Fekl said more than 50,000 police, gendarmes and soldiers would be deployed for each leg of the election.

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