PARIS, France (AFP) — Prosecutors have filed terror charges against two suspected jihadists believed to have been planning to carry out an attack after their upcoming release from prison, sources close to the case said Monday.

The men discussed the would-be plot, which included possibly taking hostages or machine-gunning victims, while they were serving time in Fresnes prison south of Paris.

“These two radical Islamists wanted to set up a group of fighters with the aim of… various actions outside prison,” said one of the probe sources.

One of the suspects is a 28-year-old Cameroonian described by authorities as an Islamic State group sympathizer, while the other is a 22-year-old Frenchman.

Both were behind bars for non-terror offenses and were suspected of being radicalized while serving their sentences. They were charged Friday with being part of a terrorist conspiracy.

The Cameroonian man was also believed to have been in contact with a person in Iraq or Syria, where Islamic State is under pressure from a US-led coalition.

France has been under a state of emergency since the IS gun and bomb attacks in Paris in November 2015 — part of a string of jihadist assaults that have left more than 240 people dead over the past two years.