The suspect for the knife attack in Paris said he had targeted weekly satirical magazine Charlie Hebdo, according to a police source.
Two people were stabbed in the attack on Friday (September 25).
It took place in front of a building where Islamist militants gunned down employees of Charlie Hebdo in 2015 because of the republication of cartoons depicting Prophet Mohammad.
The attack coincided with the start of the trial of 14 alleged accomplices this month in the Charlie Hebdo attack. The gunmen behind that attack killed 12 people.
A judicial source said the suspect's custody had been extended on Saturday morning.
According to French law, he faces a formal investigation at the end of the process.
A suspected accomplice of the attacker was released in the early hours of Saturday while another person close to the suspected attacker has been arrested.
By midday Saturday, seven people remained in custody.
Interior Minister Gerald Darmanin confirmed that the suspected attacker was from Pakistan and arrived in France three years ago as an unaccompanied minor.
Charlie Hebdo vacated its offices after the 2015 attack and is now in a secret location.
For locals near the building, which is now used by a television production company, the newest attack reminds them of the terror five years ago.
Al-Qaeda, the militant Islamist group that claimed responsibility for the 2015 attack, threatened to attack Charlie Hebdo again after it republished the cartoons on the eve of the trial.