A Palestinian teenager charged after a viral video showed her hitting two Israeli soldiers in a case that has gained global attention went on trial in military court on Tuesday in closed-door proceedings.

The judge in the trial ordered journalists removed from the courtroom, ruling that open proceedings would not be in the interest of 17-year-old Ahed Tamimi, who is being tried as a minor.

Only family members were allowed to remain in the courtroom, with diplomats present to observe also asked to leave.

A large crowd of local and international journalists had shown up to cover the trial of Tamimi, who has become something of an icon for Palestinians and supporters of their cause worldwide.

Trials of minors in military court are typically closed, but Tamimi's lawyer said previous hearings for the teenager were open and she argued for it to remain that way.