PARIS — A 24-year-old Algerian computer science student suspected of planning an imminent terror attack was taken into custody in Paris over the weekend, the French authorities said on Wednesday.

The police found AK-47 assault rifles, several handguns and ammunition in his home and his car, along with notes on potential targets, 2,000 euros in cash, bulletproof vests and police armbands, according to the Paris prosecutor, François Molins.

The authorities said the student was suspected of involvement in the killing of a woman and was thought to be planning to attack at least one church. He had expressed a desire to go to Syria and had been flagged by police services as a security risk, the authorities said, but checks made in the past two years had turned up nothing to warrant an investigation.

“Detailed documents were also found, establishing without any doubt that the individual was planning an imminent attack, most likely against one or two churches,” the interior minister, Bernard Cazeneuve, said at a news conference. “That attack was avoided on Sunday morning.”