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

PARIS — A former soldier has been arrested in France on suspicion of planning a terrorist attack ahead of the country’s crucial presidential elections on Sunday, the Paris Prosecutor’s office said Saturday.

The former soldier was arrested Friday near a military base in Evreux, in the northwest region of Normandy, the prosecutor’s office told NBC News.

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

Investigators found a USB Key with a video clip of the man pleading allegiance to ISIS, and small ISIS flags were found on his person and in his car which was parked near the military base.

A judicial source said further investigation and a house search turned up weapons including a shotgun, revolvers and ammunition.

Police stand in front of the Eiffel Tower in Paris after a gunman killed an officer on the Champs Elysee in April Jeff J Mitchell / Getty Images

The source confirmed the suspect was not on a terrorist watch list as reported by the French media.

The man remained in custody Saturday and was undergoing questioning.

The arrest came 48-hours before French voters go to the polls to choose between centrist candidate Emmanuel Macron and far-right populist Marine Le Pen on Sunday.

The country has been on high alert over the prospect of another terrorist attack ahead of this weekend's elections. In the days before the first-round of voting on April 23, a gunman ambushed three Parisian police officers on the Champs-Elysees, killing one and wounding two others.

ISIS claimed responsibility for the shooting and French President Francois Hollande said it was likely a terrorist attack.