French authorities on Saturday charged a 33-year-old man, who had pledged allegiance to the Islamic State (ISIS) group in a video, with planning a terror attack, judicial sources said, according to AFP.

The man, who was not known to police, was arrested near the southern city of Nimes on Tuesday. Bomb making materials were found in his house but there was no indication of the targets he was planning to attack, the sources said.

"This is the first attack foiled this year," a source close to the investigation told AFP.

The suspect was charged with "associating with terrorist criminals" and placed in custody.

"The investigation started when police saw on social media and attempt by a man in the Nimes region with Islamist leanings trying to procure a weapon," the source close to the investigation said.

The raid on the man's house yielded a tube filled with powder which could likely be used as an explosive, different powders and a device to start a fire, the source said.

Several videos taken last year were seized, including one in which the man pledges allegiance to self-proclaimed ISIS "caliph" Abu Bakr al-Baghdadi with the organization's black flag in the background.

ISIS claimed two attacks in France last year: The April 20 shooting of a policeman on Paris's emblematic Champs Elysees and an October 1 attack in the Marseille railway station that killed two people.

France has been on heightened alert in recent years, as more than 240 people have been killed in the country in terrorist attacks since early 2015.

Last August, at least six French soldiers were injured after a car rammed into them in Paris's Levallois-Perret suburb.

Last February, a knife-wielding terrorist attacked French soldiers at the Louvre.