OFER MILITARY BASE, West Bank—Palestinian protester Ahed Tamimi went on trial behind closed doors in an Israeli military court Tuesday for slapping and punching two Israeli soldiers—the opening of a high-profile case against the teen who is seen by some as a Joan of Arc-like heroine and by others as a troublemaker or even a terrorist.

Israel’s hard-charging prosecution of Tamimi, recognizable by her unruly mane of curly hair, has drawn international attention and criticism. Underlying the case are clashing narratives about Israel’s half-century of occupation, the extent of permissible Palestinian resistance to it and the battle for global public opinion.

Tamimi, who turned 17 in prison last month, was led into a courtroom packed with journalists, several European diplomats and members of her family.

“Stay strong, stay strong,” shouted her father, Bassem, from the back row. She appeared calm and confident as she took a seat in the dock, surrounded by camera crews and photographers.

After a few minutes, the judge suddenly ordered all spectators except family members to leave and announced that the proceedings would continue behind closed doors. He said he was acting in the best interest of a juvenile defendant.

Defense lawyer Gaby Lasky protested, saying the family wants an open trial.

“The court decided what is best for the court, and not what is good for Ahed,” Lasky later told reporters, accusing the judge of trying to keep the world from watching.

In the closed session, the court read a 12-count indictment against Tamimi, including charges of assault and incitement that could keep her in prison for several years.

Lasky argued that the court is an organ of what she described as an “illegal occupation” and that the charges must therefore be thrown out.

“We believe that this is an indictment solely created in order to deter Ahed and other Palestinian youths” from resisting occupation, Lasky said afterward. She said she is still waiting to receive case material from the prosecutor, that her client did not enter a plea and that the next hearing would be March 11.

Tamimi’s scuffle with the two soldiers took place Dec. 15 in her West Bank village of Nabi Saleh, home to about 600 members of her extended clan. At the time, protests had erupted in several parts of the West Bank over President Donald Trump’s recognition 10 days earlier of contested Jerusalem as Israel’s capital.

In Nabi Saleh, several teenage boys were throwing stones that day at soldiers who fired stun grenades and rubber-coated steel pellets. A 15-year-old cousin of Ahed Tamimi was hit at close range by a rubber bullet and seriously wounded. He later had a section of his skull removed and is recovering at home.

Ahed Tamimi had just learned of his injury when she, along with her mother and another cousin approached two soldiers at the entrance to the courtyard of the family home, according to relatives.

In later events captured on video, Ahed yells at the soldiers to leave, slapping one and punching the other in the head. The soldiers casually fend her off.

The video continues with her leaning against the courtyard wall, calling for large demonstrations as “the only way to reach results,” but adding that Trump must bear responsibility for any Palestinian reaction, including stabbings and suicide attacks, and that “everyone needs to do something and to unite.”

The video stirred complaints in Israel that the soldiers had been humiliated. She was arrested at her home Dec. 19 in the middle of the night and has been in detention ever since. At a previous hearing, the military court at the Ofer army base in the West Bank ordered her held until the end of proceedings.

Senior Israeli government officials called for a harsh punishment.

Military prosecutors presented an indictment involving the Dec. 15 scuffle, but also other alleged incidents going back to April 2016.

From a young age, Tamimi has taken part in regular anti-occupation marches by residents of Nabi Saleh, which lost land to a nearby Jewish settlement. Protests often ended in stone-throwing clashes. One famous photo shows her as a 12-year-old raising a clenched fist at a soldier towering over her.

Her father has rejected allegations he is exploiting his daughter for political objectives. He said the occupation has robbed her of a normal childhood, that it’s better for her to confront it than to fear it, and that he believes her generation will lead Palestinians to freedom.

Israel captured the West Bank, Gaza Strip and east Jerusalem in 1967, and Palestinian hopes of establishing a state in those territories seem increasingly dim. Several rounds of U.S.-led negotiations on a partition deal have failed, and gaps have only widened between the sides.

Trump has promised to propose a peace plan, but Palestinian officials have said they fear any U.S. offer would fall far short of their demands, including a capital in Israeli-annexed east Jerusalem.

Underlying Tamimi’s trial is the debate about what rights, if any, Palestinians have to push back against Israeli rule.

Michael Sfard, an Israeli human rights lawyer, said that Israeli military law “is set up to label every act of resistance, violent or nonviolent, as criminal” and that the military court system is just another branch of an occupying army.

“It is not about justice,” he said. “Its main objective is to curb any attempt of resistance and enhance the control over the population.”

Israel has dealt with Tamimi’s actions as purely criminal offenses.

Retired Israeli law professor Emanuel Gross argued that international law permits an occupying power to set up military courts and that Israel’s system is in line with those conventions.

“You are allowed, of course, to protest the fact that you are under occupation, but you are not allowed to protest in such a way that it will be considered illegal,” said Gross, a military court judge until the 1990s. “That’s exactly what Tamimi is accused of doing, by using force against soldiers.”

Gross acknowledged that the drafters of those conventions were likely “not dreaming that occupation will last such a long, long time.”

The Tamimi case has struck a nerve internationally. Diplomats from Germany, Britain, Ireland and other European countries came to court Tuesday as observers.

U.N. human rights experts said Tamimi’s continued detention violates international legal standards.

The Convention on the Rights of the Child, which Israel has ratified, states that minors can only be deprived of liberty as a last resort and for the shortest appropriate time, said Michael Lynk, a U.N. special rapporteur on human rights in the Palestinian territories, in a statement.

He said the Tamimi case is not isolated, and that Israel detains and prosecutes 500 to 700 Palestinian children in military courts annually.