A man suspected of killing two French police employees posted a 12-minute Facebook video and two tweets as he carried out the attack in the name of extremist group Islamic State, a prosecutor said.
The suspected attacker knifed the police commander outside his home before killing his 36-year-old companion - a police administrator - inside, prosecutor Francois Molins said during a press conference Tuesday.
The couple's 3-year-old son survived and was taken to hospital in a state of shock.
Molins said the man, named as Larossi Abballa, claimed while he spoke with police forces to have pledged allegiance to the Islamic State three weeks prior.
He said he had responded to a call by Islamic State leader Abu Bakr Al-Baghdadi to kill infidels at home with their families, Molins said.
Molins said Abballa, who was killed by French special police forces more than three hours after the standoff began, claimed to know that his victim was a police officer.
The attack took place at the couple's home, in a residential neighbourhood 50 kilometres west of Paris. It began shortly after 8 pm [1800 GMT] on Monday evening, Molins said, and ended when the special forces stormed Abballa's location around midnight.
Abballa also had a list of additional targets that included public figures, Molins said. The prosecutor added that three more people have been taken into custody since the incident.
French President Francois Hollande held an emergency meeting early Tuesday morning, after which he said the attack was "an act of incontestable terrorism." He added that the threat level was raised in France and beyond.
Interior Minister Bernard Cazeneuve said after the meeting that the threat of terrorism was "elevated in France, elevated in Europe and elevated in the West, as we have seen with the events that took place 48 hours ago in the US."
On Sunday, the lone gunman who killed 49 people in a gay nightclub in Orlando, Florida, pledged allegiance to Islamic State in an emergency call while the attack was under way.