Palestinian teen Ahed Tamimi reached a plea bargain with military prosecution on Wednesday, according to which she is to be sentenced to eight months in prison. The military court handling her case approved the plea agreement on Wednesday, making it an official court order.

As part of the agreement, the 17-year-old pleaded guilty to four counts of assault, including the videotaped slapping of an Israeli soldier. In addition to the eight month jail sentence, she is to pay a fine of 5,000 shekels ($1,437).

The prosecution also reached plea agreements with Nur and Nariman Tamimi, Ahed Tamimi's cousin and mother, both of whom were involved in the videotaped slapping of the soldier. The agreement, which the court has also approved, sentences Nur Tamimi to time served -- 16 days in prison -- and a 2,000 shekel ($575) fine. Nariman Tamimi's sentence is eight months in prison and a fine of 6,000 shekels ($1,725).

>> Israel Must Free Ahed Tamimi | Editorial ■ Analysis | Palestinian Girl in Viral Video Arrested for Making the Occupation Look Bad

Ahed Tamimi's case has been conducted behind closed doors. The military court rejected a request that she made this week to hold proceedings in public.

Earlier Tamimi's lawyer, Gaby Lasky, confirmed that a plea agreement had been reached. "The fact that the plea agreement provides for the dropping of all of counts of the indictment that made it possible to detain her until the end of legal proceedings is proof that Tamimi's arrest in the middle of the night and the legal proceedings against her were steps designed to settle scores," Lasky said.

Before the ruling was confirmed by the court, sources told Haaretz that according to the plea bargain, Tamimi would be found guility of the assault that was videotaped in December, incitement to violence for the posting of the video, and two other assaults on soldiers. Additional charges for assault and stone-throwing were to be dropped.

According to one source, the punishment in Ahed Tamimi's case is not considered particularly lenient or particularly severe. The Israeli military felt the need to end the legal matter, the source said, as it damaged the army's reputation in the media and internationally, which may be why the plea bargain was intensively promoted.

Tamimi's initial January indictment included 12 charges going back to 2016. The indictment included five counts of assault against security forces, including stone throwing. She was charged with assaulting a soldier, threatening a soldier, interfering with a soldier in the line of duty, incitement and throwing objects at a person or property.

Tamimi's mother, Nariman Tamimi, was also charged with incitment on social media– she filmed the slapping incident– and with assault. Tamimi's cousin, Nur, was indicted on charges of aggravated assault.

Nur Tamimi said she and Ahed slapped the soldiers in part because they had invaded Ahed's yard on December 15, the day they were filmed – but the main reason was that they had just read on Facebook that a cousin, Mohammed Tamimi, had suffered an apparently fatal head injury from an Israeli soldier's buillet. He actually survived the shooting.

Bassem Tamimi, Ahed's father, said that his wife and daughter had done nothing wrong and are "fighting for freedom and justice."