A man claiming allegiance to so-called Islamic State (IS) stabbed a French policeman to death before being killed when police stormed a house, in what officials say was a "terrorist act".
The attacker took the officer's partner and their son hostage in their home in Magnanville, near Paris.
The partner was found dead but the child was rescued.
French media say the attacker had been sentenced in 2013 for involvement with jihadist groups with links to Pakistan.
Unnamed sources identified him as 25-year-old Larossi Abballa, who lived in nearby Mantes-La-Jolie and was convicted for "criminal association with the aim of preparing terrorist acts".
He was sentenced to a three-year term, with six months suspended, they said.
Islamic State's Amaq news agency said an IS "fighter" carried out the attack.
If that is confirmed, it would be the first militant attack in France since a state of emergency was imposed following last November's attacks which left 130 dead in Paris.
And it happens as the country is in high alert as it hosts the Euro football championship, which started on Friday.
French prosecutors launched an anti-terror investigation, AFP news agency reported.
'Abject act of terrorism'
French Interior Minister, Bernard Cazeneuve, said the attack was an "abject act of terrorism".
He spoke as a cabinet meeting was being held by President Francois Hollande.
In a statement earlier, Mr Holland called it an "abominable drama."
Witnesses quoted by AFP said that the knife-wielding man may have shouted "Allahu akbar" (God is greater) when he attacked the 42-year-old policeman, who was not in uniform, outside his home.
The attacker then went inside the house and took a woman and child hostage.
He is reported to have claimed allegiance to IS while talking to police negotiators.
Interior ministry spokesman Pierre-Henry Brandet said France's elite police Raid unit was brought in after the officer's killer took hostages at around 21:00 (19:00 GMT).
He said negotiations had been unsuccessful and a decision had been made to "launch an assault" at about midnight.
Witnesses reported hearing loud explosions as the officers from the Raid unit moved in.
"The toll is a heavy one," Mr Brandet later told reporters at the scene.
"This commander, this police officer was killed by the individual… (and) we discovered the body of a woman. The assailant, the criminal was killed. Thankfully, a little boy was saved. He is safe and sound."
A source later told AFP: "The anti-terror department of the Paris prosecution service is taking into account at this stage the mode of operation, the target and the comments made during negotiations with the Raid."
The victims have not yet been named. Magnanville is about 55 km (35 miles) north-west of the French capital.