A French woman went on trial on Monday for killing the man who raped her for years as her stepfather before becoming her husband and pimp.

The story of Valerie Bacot has moved campaigners against domestic violence, with hundreds of thousands of people signing a petition for her release.

"I had to put an end to it," Bacot, 40, wrote in a book published last month called "Everybody Knew", adding: "I was afraid, all the time."

The trial, which opened in Chalon-sur-Saone in France's central Burgundy region, is due to run through Friday.

Bacot was 12 when her mother's partner, Daniel Polette, who was 25 years her senior, raped her for the first time.

He was sent to prison, but after his release returned and resumed the serial rapes.

"He told my mother that he wouldn't start again. But he did," she told the court.

At 17, Bacot became pregnant, was thrown out of the house by her alcoholic mother, and went to live with Polette.

"I wanted to keep my child. I had nobody. Where could I go?," she told the court.

Polette, also a heavy drinker, became increasingly violent, attacking her with a hammer at one point.

"At first he would slap me, later that became kicking, then punches and then choking," she said, describing her life as an "extreme hell".

Polette ordered her to work as a prostitute for truck drivers, using the back of a Peugeot people carrier, and gave her instructions through an earpiece he forced her to wear to make sure she complied with the demands of clients whom he charged between 20-50 euros ($24-$59).

Investigators established that Polette threatened to kill her if she refused, pointing a gun at her many times.

Valerie Bacot (C) arrives flanked by relatives at the Chalon-sur-Saone Courthouse
Valerie Bacot (C) arrives flanked by relatives at the Chalon-sur-Saone Courthouse AFP / JEFF PACHOUD

When Polette started questioning their 14-year old daughter Karline about her budding sexuality, Bacot said she decided that "this has to stop".

On March 2016, after Polette ordered his wife to undergo yet another sexual humiliation by a client, she used the pistol that he kept in the car to kill him with a single bullet to the back of the neck while he was in the driver's seat.

Bacot said she wanted to make sure her daughter wouldn't suffer the same fate that she had. "I wanted to save her," she said.

The circumstances of the shooting rule out any possible claim of legitimate self-defence.

Bacot hid the body in a forest with the help of two of her four children. In October 2017 she was arrested, confessed and one year later released on bail.

She made no comment as she arrived at the courthouse Monday, a slight figure with a ponytail and a black jacket who appeared intimidated by the crowd of reporters.

Her lawyers said ahead of the trial that "the extreme violence that she suffered for 25 years and the fear that her daughter would be next" pushed her to kill Polette.

The same lawyers, Janine Bonaggiunta and Nathalie Tomasini, had already defended Jacqueline Sauvage, a French woman who was sentenced to 10 years in prison for killing her abusive husband but won a presidential pardon in 2016 after becoming a symbol for the fight against violence directed at women.

"These women who are victims of violence have no protection. The judiciary is still too slow, not reactive enough and too lenient towards the perpetrators who can continue to exercise their violent power," Bonaggiunta told AFP.

"This is precisely what can push a desperate woman to kill in order to survive," she said.

Bacot was "certain that she needed to commit this act to protect her children", a court evaluation found.

By Monday afternoon around 588,000 people had signed a petition demanding that Bacot, who risks life in prison for murder, be cleared of the charge.