PARIS -- 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 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 for an ambulance. Police say his car and apartment contained an arsenal of weapons.

Other charges sought by the prosecutor include attempted homicide, possession of weapons, theft and criminal association, all in relation to a terrorist plot.

A search of the suspect's house turned up three Kalashnikov assault rifles along with phones and computers that police used to establish he'd been in contact with someone possibly located in Syria, who urged the suspect to target a church, according to the prosecutor.

Police also found Arabic-language material that mentioned al-Qaida and the Islamic State group in the man's apartment, but so far there is no evidence the suspect had direct ties to any organized groups.

Aurelie Chatelain, a 32-year-old Frenchwoman visiting in Paris, was found shot to death in her car on Sunday morning. Authorities say she appeared to have been killed at random and ballistics evidence linked her death to the suspect.

An attack on a church would be a new target in France, where Jewish sites have been under increased protection since the 2012 attack on a Jewish school and the killings at a kosher supermarket this year.