PARIS — He stabbed an off-duty police officer and left him bleeding to death on his own doorstep. He forced his way inside the home and stabbed and killed the officer’s female companion. He then sat down and videotaped himself live on Facebook declaring allegiance to the Islamic State, according to the French law enforcement authorities.

Sitting just behind him was the couple’s son, a terrified 3-year-old boy, of whom Larossi Abballa, the killer, said dismissively, “I have not decided what to do with him,” according to David Thomson, a French journalist for Radio France Internationale and the author of a book on jihadists who saw Mr. Abballa’s online posts before they were taken down.

The events that unfolded between about 8 p.m. and midnight on Monday — when elite police forces broke into the house in the small town of Magnanville, fatally shot Mr. Abballa, 25, and rescued the boy — were the second time within 48 hours in which a person appearing to act alone claimed to kill in the name of the Islamic State.

In the attacks in both Magnanville and Orlando, Fla., the killers had more than just brushed up against the authorities before, in what has become a distressingly familiar pattern — from the set of attacks in Paris in November, to those in Brussels in March and beyond. The Orlando gunman, Omar Mateen, had been interviewed twice by the Federal Bureau of Investigation for his possible links to terrorism, and Mr. Abballa had been convicted for having links to a terrorist network and served about two years in jail before being released.