PARIS — Five men who were arrested on Sunday in France were Islamic State operatives planning an “imminent” attack under the direction of a commander based in the terrorist group’s haven in Iraq and Syria, the authorities announced on Friday.

The news immediately raised worries in France, which has been struck by three major terrorist attacks since January 2015, killing more than 200 people.

The five men, ages 26 to 37, appeared before a special terrorism judge on Friday and were being investigated on terrorist conspiracy and weapons charges, according to the Paris prosecutor, François Molins, whose office handles terrorism cases nationwide. The five were among seven arrested in Strasbourg and Marseille on Sunday; the other two have since been released.

The arrests came shortly before the popular Christmas market in Strasbourg opened on Friday; the annual tradition attracts 2 million visitors every year.