A French mother who held down her four-year-old son while he was raped by his stepfather in a prison visiting room was sentenced to a maximum 20 years in jail.

Her partner, 31-year-old Lionel Barthelemy, who has been jailed since August 2009 for violence, also received the same sentence from the court in Strasbourg, eastern France.

Both Sabrina Bonner, 25, and Barthelemy have admitted to multiple counts of rape and sexual assault of the boy, now eight.

Some of the assaults, including the rape in the visiting room at the Toul detention centre in eastern France, had been filmed on a mobile phone.

"The behaviour of Sabrina B. is not even that of an animal towards its child," said prosecutor Gilles Delorme, who also described Barthelemy as "a sadist in the purest form".

At the detention centre, Bonner had blindfolded her son and made him kneel on a chair in front of Barthelemy, then held him by the arms as he was raped.

The case had raised questions over why prison staff failed to stop, or even notice, an act of such brutality taking place during what was supposed to be a supervised visit to a prisoner serving a sentence for domestic violence, who had been diagnosed as having schizophrenic tendencies.

Investigators had found that black bin bags were used to cover the glass window of the door of the visiting room.

Yannick Pheulpin, the lawyer representing the victim, said he intended, at the end of the trial, to initiate legal proceedings aimed at holding the prison to account for the suffering of the child.

Psychiatrist Jean-Pierre May told the court that the couple had a "sado-masochist relationship" in which each took turns to be "master" and "slave".

"It is hard to determine who used the other more" during the savage acts carried out on the boy, said another expert, Jean-Georges Rohmer.

Bonner has admitted carrying out multiple sexual assaults on her child during 2009 and 2010, filming them on her mobile phone and giving the phone's memory card to her imprisoned partner.

She gave herself up to police in May 2011, shortly before Barthelemy was due to be released from prison.

Bonner has claimed that she carried out the assaults under the orders and threat of violence from Barthelemy.