PARIS — A woman has been found guilty of murder in the killing of her husband but will not be sent back to prison, after she recounted in a best-selling book how he had abused and raped her for decades.

The case of Valérie Bacot prompted strong reactions in France, and more than 700,000 people signed a petition calling for her not to be sent to prison as her trial began this week in the Saône-et-Loire region.

Bacot, 40, was sentenced to a four-year prison term Friday, of which three are suspended. She has already served a year in pretrial detention, meaning that she walked free after the court announced the verdict.

Leaving the building, Bacot said she was “mentally and physically exhausted” after the possibility of life in prison had loomed over her since her arrest. Supporters cheered and applauded as she left the court.

Last month, Bacot published a best-selling book detailing decades of abuse by her former stepfather-turned-husband, Daniel Polette. She confessed to shooting him in March 2016, but said she acted in desperation and self-defense.

Her children helped to bury Polette, 61, near the French village of La Clayette.

Bacot’s book — “Tout Le Monde Savait (Everyone Knew)” — struck a nerve in France, where the #MeToo movement has been slow to gain momentum, despite what activists have described as a long-standing culture of impunity for sexual abusers.

In her book, Bacot recalled how Polette began raping her when she was 12, while he was still in a relationship with Bacot’s mother.

A court found Polette guilty of those accusations at the time, sentencing him to four years in prison.

After his early release, he returned to the family, and continued to sexually assault Bacot. She says she was thrown out of the home by her mother when she got pregnant with Polette’s child at age 17.

“I had nobody,” Bacot told the court. “Where could I go?”

Bacot decided to move in with Polette.

She spent the next 18 years in what she has described as “hell.” The couple eventually married, but the abusive relationship became increasingly violent, she recalled in court, and Polette forced her to prostitute herself. Bacot said Polette made her wear an earpiece during sexual encounters with the men so that her husband could give her instructions.

Before the killing, Polette suggested that he might sexually assault her daughter, according to Bacot, and he threatened to kill Bacot herself, waving a firearm in front of her, Bacot said. Her children said they repeatedly tried to alert French police to Polette’s threats — an accusation authorities have denied.

The prosecution described the chain of events as a premeditated killing.

But in not asking for the maximum sentence, the public prosecutor acknowledged the complexities of the case, adding that Bacot’s children would be negatively impacted if she had been sent back to prison.

Tim Elfrink contributed to this report.