Updated

The Paris prosecutor's office says a formal terror investigation has been opened after the arrest this week of a computer science student who authorities say planned an attack on a church and is suspected in the shooting death of a woman.

The 24-year-old student, an Algerian identified as Sid Ahmed G., was being placed under preliminary investigation on Friday after prosecutors formally opened an inquiry on eight charges. The charges, which include killing in relation to a terrorist enterprise, make clear that investigators believe the suspect had accomplices.

Prosecutors say the suspect's DNA linked him to a woman found dead on Sunday.

He was arrested hours later after apparently shooting himself by accident and calling an ambulance. Police say his car and apartment contained an arsenal of weapons.