An attacker has killed two people before being killed by police in a town west of Paris, a senior French official said.
Jean-Jacques Brot, the top government administrator in the Yvelines region, tweeted that the attacker in the town of Trappes was "neutralised" and had died.
The tweet also said that two of the attacker's victims were killed and another seriously injured.
Earlier, media reports said the attacker had used a knife on his victims before being shot by police.
Islamic State claimed responsibility for the knife attack through its Aamaq news agency in a post shared on social media channels.
The agency said the attack was motivated by calls from the IS leadership to attack civilians in countries at war with the extremist group.
Hours earlier, IS leader Abu Bakr al-Baghdadi urged followers to attack enemies everywhere by all means, including in knife attacks.