Lawyers for a Palestinian teenager filmed slapping and kicking an Israeli soldier last year have agreed a plea bargain that will see the 17-year serve a year in prison.

Ahed Tamimi, who was indicted in December on five counts of assault against security forces, included stone-throwing, will serve another eight months in jail, having been behind bars for four already.

She became an icon of resistance, appearing on murals and posters, after she was filmed hitting soldiers on her driveway, aged 16. Her father later said that she had just received news that her cousin had been seriously injured by a soldier’s bullet.

Tamimi’s case has been a rallying call for Palestinian supporters and her situation has been raised in parliaments around the world, in particular the closed-door nature of her hearing in front of a military judge.

Commentators say the Israeli military agreed to the plea bargain – which reduced the charges – because the case reflected badly on the country.

Gaby Lasky, the teenager’s lawyer, said the military’s dropping of all charges “is proof that Tamimi’s arrest in the middle of the night, and legal proceedings against her, were steps designed to settle scores”.

Lasky had earlier asked that the trial of Tamimi – who marked her 17th birthday in prison – be heard in public. The request was denied by Israeli authorities.