(Corrects attribution of comments in paragraph 4)
* Charlie Hebdo’s offices were attacked in 2015
* Main suspect is of Pakistani origin - police source
* Prosecutors treating attack as terrorism
* FACTBOX-France’s litany of attacks:
PARIS, Sept 25 (Reuters) - A man armed with a meat cleaver attacked and wounded two people on Friday who had stepped out for a cigarette in front of the Paris office building where Islamist militants gunned down employees of satirical magazine Charlie Hebdo five years ago.
Police detained the man suspected of carrying out the attack soon after with bloodstains on his clothes next to the steps of an opera house about 500 metres (yards) away.
French officials said the attack was terrorism. A police source told Reuters the suspect was 18 years of age and of Pakistani origin.
A local resident, who gave his name as Albert, told Reuters he heard a long, deathly shout from “a person who was screaming and screaming”.
Nathan Messas, a doctor, also lives near the scene of the attack. “Once again, hatred, gratuitous hatred. I was here five years ago. Five years later, we’re here again. I don’t know when this is going to end,” Messas said.
The victims were taken to hospital but their lives were not in danger, officials said.
Prosecutors said they were provisionally treating the incident as terrorism, in part because of the symbolism of the place where the attacker struck.
The attack also coincided with the start this month of the trial of 14 alleged accomplices in the 2015 Charlie Hebdo attack. The gunmen behind that attack killed 12 people.
Investigators said the militants wanted to avenge the publication of cartoons depicting the Prophet Mohammad in the magazine. Charlie Hebdo republished the cartoons on the eve of the trial this month.
A second suspect was detained and prosecutors were trying to establish his relation to the knife attacker. The second man is Algerian, according to the police source.
Prime Minister Jean Castex, who rushed to the scene, said: “The government is ... determined with all its means to fight terrorism.”
Charlie Hebdo vacated its offices after the 2015 attack and is now in a secret location. The building is now used by a television production company.
Two of its staff, a man and a woman, were in the street having a cigarette break when they were attacked, according to prosecutors and a colleague of the victims.
In the immediate aftermath, a neighbour said she saw blood on the ground and people pulling a wounded woman away into the office building.
She said workers repairing the road told her “a dark-skinned man randomly hit a lady with a big butcher’s knife” in front of a mural that serves as a memorial to victims of the 2015 attack.
Paul Moreira, a journalist from the Premieres Lignes media production company, told French broadcaster BFM TV it was his colleagues who were attacked.
“It’s somebody who was in the road with a meat cleaver who attacked them in front of our offices. It was chilling.”
France has experienced a wave of attacks by Islamist militants in recent years and Friday’s stabbing demonstrated the long shadow cast over the country by the Charlie Hebdo shootings.
Bombings and shootings in November 2015 at the Bataclan theatre and sites around Paris killed 130 people, and in July 2016 an Islamist militant drove a truck through a crowd celebrating Bastille Day in Nice, killing 86.
Al-Qaeda, the militant Islamist group that claimed responsibility for the 2015 attack, threatened to attack Charlie Hebdo again after it republished the cartoons this month.
Police moved Charlie Hebdo’s head of human resources from her home this week after threats against her life.
The staff of the magazine issued a statement expressing their support for the victims of Friday’s attack. “Far from terrorising us, such events should make us even more assertive in the defence of our values,” the statement said.
Additional reporting by Dominique Vidalon, Henri-Pierre Andre, Mathieu Protard, Bertrand Boucey, and John Irish; Writing by John Irish and Christian Lowe; Editing by Timothy Heritage and David Clarke
Our Standards: The Thomson Reuters Trust Principles.