An Islamic extremist with an arsenal of loaded guns was prevented from opening fire on churchgoers only because he accidentally shot himself in the leg, French officials said.

The 24-year-old computer science student, who was also suspected in the death of a young woman whose body was found on Sunday shortly before his arrest, had been flagged as a risk for intent to travel to Syria but there had been no specific reason to open a judicial investigation, France's Interior Minister Bernard Cazeneuve said.

Paris prosecutor Francois Molins said the suspect - an Algerian who had lived in France for several years - was arrested in Paris after he apparently shot himself by accident and called for an ambulance.

He was waiting outside his apartment building for first aid when police arrived. They followed a trail of blood to his car, which contained loaded guns, and notes about potential targets.

A search of his apartment in south-eastern Paris turned up more weapons including three Kalashnikov assault rifles along with phones and computers that police used to establish that he'd been in communication with someone "who could have been in Syria".

Aurelie ChatelainAurelie Chatelain

This person "explicitly asked him to target a church," Mr Molins said, declining to answer questions about the investigation into what he termed "an imminent attack".

Police also found Arabic-language material that mentioned al Qaida and the Islamic State group in the man's apartment. There was no immediate evidence that the suspect had direct ties to any organised groups.

Police have arrested one person believed to be acquainted with the suspect in the town of Saint-Dizier, Molins said, but gave no further details.

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

The suspect was treated for a leg wound and remains in hospital.

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.

Extremists have targeted Christians in the Middle East. A video released on Sunday showed Islamic State militants in Libya killing captive Ethiopian Christians.

"The terrorists target France to divide us," Prime Minister Manuel Valls said.

Sign up to our free newsletters

Get the best updates straight to your inbox:
Please select at least one mailing list.

You can unsubscribe at any time by clicking the link in the footer of our emails. We use Mailchimp as our marketing platform. By subscribing, you acknowledge that your information will be transferred to Mailchimp for processing.