A teenage Palestinian girl who was filmed kicking and slapping two Israeli soldiers has been sentenced to eight months in jail as part of a plea bargain.

Ahed Tamimi, 17, became a hero to Palestinians after the footage emerged of her hitting the soldiers at the entrance to her home in the village of Nabi Saleh in the occupied West Bank.

Tamimi was 16 at the time of the offence.

Her lawyer, Gaby Lasky, said she is also being fined 5,000 shekels (about $1,400).

Tamimi told reporters in court there is “no justice under occupation and we are in an illegal court.”

Palestinians clash with Israeli troops during 'Day of Rage' Show all 18 1 /18 Palestinians clash with Israeli troops during 'Day of Rage' Palestinians clash with Israeli troops during 'Day of Rage' Israeli forces scuffle with Palestinians at Damascus Gate in Jerusalem's Old City AFP/Getty Images Palestinians clash with Israeli troops during 'Day of Rage' A Palestinian protester hurls stones as tear gas is fired by Israeli troops Reuters Palestinians clash with Israeli troops during 'Day of Rage' A Palestinian protester runs during clashes with Israeli troops REUTERS Palestinians clash with Israeli troops during 'Day of Rage' Israeli forces scuffle with Palestinians at Damascus Gate in Jerusalem's Old City AFP/Getty Images Palestinians clash with Israeli troops during 'Day of Rage' Palestinian protesters run during clashes REUTERS Palestinians clash with Israeli troops during 'Day of Rage' Israeli border policemen and a Palestinian protesters clash REUTERS Palestinians clash with Israeli troops during 'Day of Rage' Palestinian protesters react to tear gas REUTERS Palestinians clash with Israeli troops during 'Day of Rage' Israeli border policemen hold on to a Palestinian protester REUTERS Palestinians clash with Israeli troops during 'Day of Rage' Palestinian protesters react to tear gas fired by Israeli troops REUTERS Palestinians clash with Israeli troops during 'Day of Rage' Israeli border policemen and Palestinians scuffle after Friday prayers in Jerusalem's Old City REUTERS Palestinians clash with Israeli troops during 'Day of Rage' A Palestinian protester moves a burning tire during clashes with Israeli troops REUTERS Palestinians clash with Israeli troops during 'Day of Rage' Worshippers chant as they hold Palestinian flags after Friday prayers Reuters Palestinians clash with Israeli troops during 'Day of Rage' A Palestinian protester hurls back a tear gas canister fired by Israeli troops REUTERS Palestinians clash with Israeli troops during 'Day of Rage' A wounded Palestinian protester is evacuated during clashes with Israeli troops REUTERS Palestinians clash with Israeli troops during 'Day of Rage' Israeli border policemen and a Palestinian youth scuffle REUTERS Palestinians clash with Israeli troops during 'Day of Rage' Israeli border policemen detain a Palestinian man REUTERS Palestinians clash with Israeli troops during 'Day of Rage' A Palestinian protester uses a sling to hurl stones towards Israeli troops REUTERS Palestinians clash with Israeli troops during 'Day of Rage' Journalists react to tear gas fired by Israeli troops REUTERS

When her trial began last month, she faced 12 charges, including aggravated assault. 8 were dropped as part of the plea deal.

She was denied bail ahead of her military trial, which took place behind closed doors. With time already served taken into account, Tamimi will remain in prison for a further five months.

Tamimi’s case prompted criticism from right-wing Israelis, who said the military looked weak for allowing the teenager to strike a soldier and an officer with impunity.

However, the army said the soldier “acted professionally” by showing restraint.

The incident has attracted international attention. Amnesty International called her the “Rosa Parks of Palestine” and her trial has been witnessed by journalists, diplomats and international observers.

A group of American public figures, including actors Danny Glover and Rosario Dawson and novelist Alice Walker, signed a petition calling for her release and comparing her case to those of “the children of immigrants and communities of colour who face policy brutality in the United States.”

Tamimi’s mother, Nariman, and a cousin were also arrested. Both are reported to have accepted plea bargains.

Magdalena Mughrabi, Amnesty International’s deputy director for the Middle East, said: “Today’s sentence is another alarming example of the Israeli authorities’ contempt for their obligations to protect the basic rights of Palestinians living under their occupation, especially children.

“Ahed Tamimi is a minor. Nothing she did warrants her continued imprisonment and she must be released immediately.