A prison inmate in France seriously injured two guards on Tuesday in what authorities have described as a "terrorist attack."

Michaël Chiolo, a 27-year-old inmate at the the prison in Condé-sur-Sarthe, near Alençon, some 200 kms east of Paris, stabbed the two guards at 09:45 CET in the family-visiting unit.

He then retreated into a room with his wife, who was visiting. Police reinforcements were sent to the prison and both were arrested shortly after 19:30, according to Interior Minister Christophe Castaner.

Justice Minister Nicole Belloubet had earlier in the day labelled the incident a "terrorist attack" and ordered an "inspection" of the site, which she described as one of the most secure in the country.

The anti-terror branch of the Paris prosecutor's office has been tasked with the investigation. A police source told the AFP news agency that Chiolo had been radicalised in prison.

It is believed the knife Chiolo used was brought in by his wife and was not picked up by metal detectors because it is made of ceramic.

The lives of the two guards are not in danger, although one required surgery after being wounded to the chest.

A representative for the Force Ouvrière trade union, Alassanne Sall, told the AFP news agency that Chiolo, who is serving a 30-year sentence for a kidnapping leading to a death, armed robbery and condoning terrorism, shouted "Allahu Akhbar" during the attack.

"It was truly a murder attempt. There was blood everywhere. The family-visiting unit was a battle scene," he added.

It comes a year after a German Islamic convert, held at a high-security prison in Vendin-le-Vieil, in northern France, attacked and wounded three guards with scissors.

The trade union is calling for penitentiaries to be blocked on Wednesday to denounce "the aggressions and insecurity that prevail on a daily basis in our prisons," it said in a statement.