The man suspected of beheading a French teacher who had shown his students cartoons of the prophet Mohammed was an 18-year-old born in Moscow and originating from Russia's southern region of Chechnya, according to reports in the French news agency AFP
Five more people were also detained over the murder including the parents of a child at the school where the teacher was working, bringing to nine the total number currently under arrest.
The two detained parents had signalled their disagreement with the teacher's decision to show the cartoons.
The other new people detained for questioning are members of the suspect's social circle but not family members.
The killing bore the hallmarks of "an Islamist terrorist attack", Macron said as he visited the scene on Friday night.
The attack happened on the outskirts of Paris at around 5:00 pm (1500 GMT) near the middle school where the teacher worked in Conflans Saint-Honorine, a northwestern suburb around 30 kilometres from the city centre.
Police had arrived at the scene after receiving a call about a suspicious individual loitering near the school, a police source said.
They discovered the dead man and soon spotted the suspect, armed with a blade, who threatened them as they tried to arrest him.
The attacker shouted "Allahu Akbar" ("God is greatest") as police confronted him. They opened fire and injured him severely. The man later died of his injuries, a judicial source said. Identification documents were found on him.
Visibly moved, the president said that "the entire nation" stood ready to defend teachers and that "obscurantism will not win".
France has seen a wave of Islamist violence since the 2015 terror attacks on the satirical magazine Charlie Hebdo and a Jewish supermarket in the capital.
French anti-terror prosecutors said they were treating the assault as "a murder linked to a terrorist organisation".
The victim was a history teacher who recently showed cartoons of the Prophet Mohammed as part of a class discussion on freedom of expression, police said.
A parent of a pupil at the school said the teacher might have stirred "controversy" by asking Muslim pupils to leave the room before showing the cartoons.
"According to my son, he was super nice, super friendly, super kind," the parent, Nordine Chaouadi, told French news agency AFP.
The teacher "simply said to the Muslim children: 'Leave, I don't want it to hurt your feelings.' That's what my son told me," the parent said.
Police said they were investigating a tweet posted from an account that showed a picture of the teacher's head, and which has since been shut down.
The killing comes as security forces have been on high alert during the ongoing trial of suspected accomplices of the attackers in the January 2015 terror attacks in Paris, which also saw a policewoman gunned down in the street.
It also comes just days after a follower of the Islamic State group who attacked a police officer with a hammer outside the Notre-Dame cathedral in Paris was sentenced to 28 years in jail.
And last month, charges were brought against a 25-year old Pakistani man after he wounded two people with a meat cleaver to avenge the publication of caricatures of the Prophet Mohammed by Charlie Hebdo, which purportedly prompted the 2015 killings.
Seventeen people were killed in the three-day spree that heralded a wave of Islamist violence in France that has so far claimed more than 250 lives.
In a tweet, Charlie Hebdo expressed its "sense of horror and revolt" at Friday's attack.