A Pakistan-born teenager has admitted to stabbing two people with a meat cleaver outside the former Paris offices of Charlie Hebdo magazine, investigators said Saturday, with nine people now detained over what the government condemned as "Islamist terrorism".

The 18-year-old, named by investigators as Hassan A. said he wanted to avenge the republication of cartoons of the Prophet Mohammed by the satirical weekly, which in January 2015 was targeted in a massacre carried out by Islamist gunmen.

The attack on Friday came three weeks into a trial in Paris of suspected accomplices in the January 2015 attacks on Charlie Hebdo, a policewoman and a Jewish supermarket that left 17 people dead.

A source close to the investigation told AFP that "everything points to (the suspect) acting alone", adding that he was not flagged for suspected radicalisation, speaks a little French and had planned to start training as a builder.

The attack occurred near Charlie Hebdo's former offices in the French capital's 11th district.
The attack occurred near Charlie Hebdo's former offices in the French capital's 11th district. AFP / Alain JOCARD

But eight other people are now also under arrest following two more detentions Saturday.

The two new individuals arrested were the suspect's younger brother and another acquaintance, a judicial source said.

A., who said he was born in the Pakistani city of Mandi Bahauddin and is 18-years-old, "takes responsibility for his action," a source close to the investigation said.

The man said during questioning he places his actions "in the context of the republication of cartoons" of the Prophet Mohammed in Charlie Hebdo on the eve of the trial opening.

French police have detained seven people, including the main suspect, in connection with the attack
French police have detained seven people, including the main suspect, in connection with the attack AFP / Laura CAMBAUD

The people wounded were employees of prize-winning TV production agency Premieres Lignes, whose offices are in the same block in central Paris that used to house Charlie Hebdo.

The man mistakenly believed Charlie Hebdo's offices were still in that building and wanted to attack journalists from the magazine, a source close to the inquiry told AFP.

Close-up map locating a knife attack in Paris and the area when a suspect was arrested
Close-up map locating a knife attack in Paris and the area when a suspect was arrested AFP / Simon MALFATTO

Charlie Hebdo moved offices after the 2015 attack and its current address is kept secret for security reasons.

The two victims were badly wounded but their lives are not in danger.

French Interior Minister Gerald Darmanin said Friday the attack was "clearly an act of Islamist terrorism". Anti-terror prosecutors have opened an investigation.

Five of the individuals detained were in an apartment in Pantin in the northern Paris suburb of Seine-Saint-Denis, the last presumed address of the suspected attacker.

IMAGES Images of one of the two presumed properties linked to the main suspect in the Paris suburb of Pantin after a man armed with a meat cleaver wounded two people outside the former offices of satirical weekly Charlie Hebdo.
IMAGES Images of one of the two presumed properties linked to the main suspect in the Paris suburb of Pantin after a man armed with a meat cleaver wounded two people outside the former offices of satirical weekly Charlie Hebdo. AFPTV / Wafaa ESSALHI

The suspected attacker, who arrived from Pakistan three years ago, was believed to have last lived in a small flat in a four-storey building in the district.

"He was very polite. I often saw him sitting on the landing with his telephone," said one neighbour, who identified herself as Josiane.

Police late Friday released another man who was detained close to the scene of the attack but whose lawyer said had actually been chasing the attacker.

The Algerian man, who has been living in France for a decade, "behaved heroically" said his lawyer Lucie Simon, complaining there had been no need to arrest him and keep him detained for hours.

Prime Minister Jean Castex on Saturday hailed the "efficiency" of the security forces following the attack during a visit to police headquarters, and said the "enemies of the Republic will never win".

Twelve people, including some of France's most celebrated cartoonists, were killed in the attack on Charlie Hebdo's offices by Islamist gunmen on January 7, 2015.

Charlie Hebdo angered many Muslims around the world by publishing cartoons of the Prophet Mohammed in 2006, and in a defiant gesture reprinted some of the caricatures ahead of the trial.

On trial are 14 alleged accomplices of brothers Said and Cherif Kouachi, the perpetrators of the 2015 attack on Charlie Hebdo that was claimed by a branch of Al-Qaeda.

A female police officer was killed a day later, followed the next day by the killing of four men in a hostage-taking at a Jewish supermarket by gunman Amedy Coulibaly.

The trial has reopened one of the most painful chapters in France's modern history, with harrowing testimony from survivors and relatives of those who died.

The magazine received fresh threats from Al-Qaeda this month after it republished the controversial cartoons.

President Emmanuel Macron's centrist government has in recent weeks begun using increasingly tough rhetoric on domestic security issues in what analysts see as a shift to the right.

Darmanin admitted that the risk of an attack around the former offices had been "underestimated".

"...it is obvious that we could have done better," he said.