PARIS (AP) — A Pakistani man accused in a double stabbing outside the former Paris offices of satirical newspaper Charlie Hebdo has been handed preliminary terrorism charges.

The suspect told investigators he acted out of anger over caricatures of the Prophet Muhammad recently republished by the weekly newspaper.

Investigating magistrates handed him preliminary charges of “attempted murder in relation with a terrorist enterprise,” the counterterrorism prosecutor’s office said Wednesday. He will remain in custody pending further investigation. Relatives and associates of the suspect were released without charge.

Counterterrorism prosecutor Jean-Francois Ricard said the Pakistan-born suspect identified himself as Zaher Hassan Mahmood, 25. Ricard said the assailant did not claim an affiliation with a specific extremist group.

Two people were seriously wounded in last week’s stabbing, which took place outside the newspaper’s former offices where Islamic extremists killed 12 people in January 2015. The two brothers involved in the 2015 attack targeted Charlie Hebdo because they believed the newspaper blasphemed Islam by publishing the same Muhammad caricatures.