A Palestinian teenage girl filmed slapping an Israeli soldier has gone on trial in an Israeli military court in a case which has split public opinion.

Ahed Tamimi, 17, is charged with 12 offences, including assaulting security forces and incitement to violence.

If convicted, she could face a lengthy jail term.

For Palestinians, Ms Tamimi is a symbol of resistance to Israeli occupation, but many Israelis regard her as a violent troublemaker seeking publicity.

Ms Tamimi arrived at the military court on Tuesday morning with her hands and feet in shackles, and wearing a prison jumpsuit.

Her father, Bassem, was waiting in the court room when she arrived, and urged her to "stay strong".

Journalists waiting to report on the trial were ordered to leave by the judge, on the grounds that the accused was being treated as a minor. Such cases are usually tried in private.

But in Ms Tamimi's case, this went against the wishes of the family.

"The court decided what is good for the court and not what is good for Ahed," her lawyer, Gaby Lasky, said outside the court.

"They understand that people outside Ofer military court are interested in Ahed's case. They understand that her rights are being infringed and her trial is something that shouldn't be happening.

"So, the way to keep it out of everybody's eyes is to close doors and not allow people inside the court for her hearings."

The case has been adjourned until March.

Viral video

Ahed Tamimi, then 16, was filmed by her mother, Nariman, shouting at and shoving two soldiers in the driveway of her family home in Nabi Saleh in the occupied West Bank on 15 December 2017.

The incident was streamed on Nariman Tamimi's Facebook page and video of the confrontation went viral.

In the footage she kicks one soldier and slaps his face, and threatens to punch the other.

Ahed Tamimi was arrested in a night-time raid days later. Her mother has also been charged with incitement on social media and assault, and her cousin, Nour, who participated in the incident, has been charged with assault.

The case sparked an outpouring of deeply opposing views between Israelis and Palestinians.

Following the incident, Israel's Education Minister Naftali Bennett said Ahed and Nour Tamimi deserved to "finish their lives in prison".

Many Israelis say Ahed Tamimi has long been exploited by her family, who they accuse of using her to try to provoke Israeli soldiers on film.

Two years ago, the teenager was seen in a viral video biting the hand of an Israeli soldier who had detained her brother on suspicion of throwing stones.

She was praised for her actions by then Turkish Prime Minister Recep Tayyip Erdogan, who presented her with a "courage" award.

Ahed Tamimi had first came to public prominence when, aged 11, she appeared in another video threatening to punch a different soldier.

For Palestinians, she has become a national icon for what they see as acts of bravery in standing up to armed soldiers on occupied land.

Her face has appeared on street murals and posters, while an online petition organised by her father calling for her release has gathered 1.7m signatures.

Special court

Ahed Tamimi said she lashed out at the soldiers whom she said she had seen in a video of her 15-year-old cousin being shot in the head with a rubber bullet that same day.

The Israeli military said it had dispatched the soldiers to the Tamimis' home, where Palestinian youths had been throwing stones at troops sent to quell violent protests in the village.

Human rights groups say Ahed Tamimi's case highlights what they say is Israel's harsh treatment of Palestinian minors.

About 1,400 Palestinian minors have been prosecuted in special juvenile military courts over the past three years, according to the Israel Defense Forces.

Civil rights groups are very critical of the Israeli system, saying it lacks fundamental protections and gives no guarantee of a fair trial.

Amnesty International has called for Ahed Tamimi's release, accusing Israel of discriminatory treatment of Palestinian children.