Islamic State's Amaq news agency said the Islamist militant group is responsible for the fatal stabbing of a 42-year-old local police chief in front of his home in an outer Paris suburb.
"Islamic State fighter kills deputy chief of the police station in the city of Les Mureaux and his wife," Amaq said on its news website.
The assailant, who barricaded himself inside the police commander's house, was shot dead by members of an elite police unit, officials said.
Police also found the body of a woman in the house and a surviving three-year-old boy, the spokesman for the Interior Ministry, Pierre-Henry Brandet, said on BFM TV minutes after the elite RAID unit stormed the house.
The woman was "most probably the wife" of the commander, prosecutor Vincent Lesclous told reporters.
The killings took place in the Paris suburb of Magnanville, about 50 kilometres northwest of the French capital and about 20 km (12 miles) from Les Mureaux where the officer was stationed.
Shortly after the attack, Lesclous said: "We have no certainty about the motivations" of the attacker.