PARIS (Reuters) - Two French prison inmates who were soon to be freed have been placed under investigation on suspicion of planning a terrorist attack and communicating by smartphone with Syria, stronghold of Islamic State militants.

The news highlighted the risk, regularly flagged by rights groups and jail authorities, that crowded prisons offer fertile ground for religious radicalization and conversion to the cause of Islamist fighters, not only in France.

It also prompted calls for a crackdown on use of smartphones inside prisons.

The two, who were nearing the end of jail time for hold-ups and other criminal activity but not terrorist offences, were taken from their cells late last week and interrogated for four days before being placed formally under investigation for suspected terrorist activity, a judiciary official said.

One element that prompted the authorities to act was the interception of encrypted message traffic with Syria, a Fresnes prison staff representative, Cedric Boyer, said.

The precise nature of what was being planned was not clear, he added.

Conveying the seriousness of the perceived threat that the two constituted, Justice Minister Nicole Belloubet told Europe 1 radio: “What happened yesterday exposed the urgency of the situation.”

French TV station LCI said the two were plotting attacks against jail wardens and police forces, while a source close to the investigation said they also had other targets planned.

More than 240 people have been killed in France in attacks since the start of 2015 by assailants who pledged allegiance to, or were inspired by, Islamic State.

France has a long record of radicalization in its prisons.

Prison guards said the ease with which smartphones can be used to communicate secretively with the world outside was an increasing problem.

“The government is going to have to put its hand in its pocket,” said Boyer, a representative of the Force Ouvriere labor union and guards at the Fresnes prison.

“Extra staffing is needed but it’s also a matter of keeping up with technology, being able to scramble 4G communications rather than staying stuck in the age of the Nokia 33-10,” Boyer told BFM TV, referring to latest technology and the days when mobile phones were a rudimentary novelty.