French police foiled an alleged Islamist terror plot and arrested the suspect who planned to attack one or more churches in Paris, the country’s top security official said Wednesday. The man, who is also accused in the death of a woman, was taken into custody on Sunday, the Associated Press (AP) reported.

The suspect, a 24-year-old computer science student, has been living in France for many years and was under surveillance by security officials since last year, Interior Minister Bernard Cazeneuve reportedly said. Authorities said the man had plans to travel to Syria, CNN reported

The Algerian man was arrested after he accidently shot himself and called for an ambulance. Police, who arrived at the scene, found a trail of blood leading to the suspect’s vehicle that was loaded with guns and notes about potential targets, the AP reported. Investigators also reportedly found weapons at the man’s apartment in southeastern Paris.

A French security official said that evidence found at the suspect’s residence indicated ties to Islamic extremism, but did not show links to any specific group, the AP reported.

The suspect had allegedly shot Aurelie Chatelain, a 32-year-old Frenchwoman, who was in Paris for some work, on Sunday morning in her car. Authorities reportedly said they could not find any motive behind the killing.

France has stepped up its fight against extremism since a series of attacks in Paris earlier this year claimed the lives of 17 people. French satirical magazine Charlie Hebdo and a kosher supermarket were attacked by gunmen, allegedly affiliated with al Qaeda, in January.