PARIS — The man accused of beheading his employer and setting off an explosion at an American chemical factory in southeastern France used a smartphone application to send a gruesome photograph of himself with the victim’s head, a French official said on Sunday.

The photo was sent via WhatsApp to a Canadian telephone number, according to the official, who requested anonymity to discuss the case. It was not clear, however, if the person to whom the photo was sent was in Canada, if the number was merely a relay point or if the recipient might have been in one place and the phone was somewhere else.

A spokesman for the minister of the Canadian Public Safety and Emergency Preparedness Department, Jean-Christophe de Le Rue, confirmed its involvement in the case. “While I cannot comment on operational matters of national security, we are assisting the French authorities with their investigation,” he said.

Video

The French president said “useless divisions” and “unbearable suspicion” must be resisted after a victim was decapitated in an assault on a factory near Lyon, France, on Friday.Published OnJune 26, 2015

He said his agency became involved because the recipient of the photograph could be in Canada. “The threat of jihadi terrorism is real,” Mr. de Le Rue said. “The first duty of any government is to secure its citizens.”

With the threat of terrorism once more very much on the minds of French citizens, Manuel Valls, speaking Sunday on French television, described a “war of civilization,” a charged phrase reminiscent of the 1996 book “The Clash of Civilizations and the Making of a New World Order” by Samuel P. Huntington, which was embraced by neoconservatives.

“We must not lose this war because it is fundamentally a war of civilization,” Mr. Valls said on the network i Tele. “This is our society, our civilization, our values that we are defending,” he said, adding that it was not just Muslims against non-Muslims, but also a struggle within the Muslim community.

Though the precise motive for Friday’s attack remained unclear, investigators appeared to be pursuing two sets of leads, the authorities said. One lead suggests that the suspect, Yassine Salhi, 35, a resident of St. Priest, a suburb of Lyon, had terrorist leanings or ties. The other suggests that he was an unstable man who had a disagreement with his boss at the delivery firm where he worked, the authorities said, which perhaps led him to become violent and then wrap his crime in the guise of an extremist act.

On Friday, according to the authorities, Mr. Salhi, drove a delivery truck onto the grounds of Air Products, the French installation of a Fortune 500 company headquartered in Pennsylvania, which sells gas and chemicals for industrial use. He plowed into a hangar creating an explosion. His boss, Hervé Cornara, apparently had been killed before the explosion. Mr. Cornara was decapitated and his head was placed on the gate of Air Products, along with black and white material inscribed with the Muslim profession of faith, according to the Paris prosecutor, François Molins, who gave a briefing late Friday. Since then a confused picture has emerged of Mr. Salhi, a husband and father of three.

Over the weekend, there were successive leaks in the French news media that whipsawed the story in different directions. However, the selfie photo was at least one strong indication that Mr. Salhi was aware of the practice in extremist circles of photographing and displaying the deaths of victims.

Late Sunday afternoon, the police took Mr. Salhi back to his home briefly to pick up some belongings before transferring him to Paris. He was being moved because the French government sends all terrorism cases to the Paris prosecutor’s office, where a division specializes in such cases. He will be held in Levallois-Perret.

Under French law, Mr. Salhi can be detained for up to 96 hours before being brought before a judge and formally charged. He would then continue to be held throughout his trial. Mr. Salhi was assigned a lawyer from Lyon on Sunday.

Mr. Salhi’s wife and sister, who had both been detained for questioning, were released Sunday, said Agnès Thibault-Lecuivre, a spokeswoman for Mr. Molins.

Get news and analysis from Europe and around the world delivered to your inbox every day with the Today’s Headlines: European Morning newsletter. Sign up here.

A version of this article appears in print on , on Page A4 of the New York edition with the headline: French Assailant Texted Beheading Photo to Canadian Number . Order Reprints | Today’s Paper | Subscribe