The closely watched trial of a Palestinian girl who slapped and punched two Israeli soldiers has been opened and adjourned after the judge ordered all proceedings to be held behind closed doors.

Ahed Tamimi, 17, appeared fresh and confident as she entered the packed Israeli military courtroom in the West Bank, in a case which has drawn wide criticism of Israel for prosecuting the teenager.

She briefly whispered to relatives in the back of the room before the judge ordered everyone except her family out.

"Stay strong!" shouted her father, Bassem Tamimi.

After the prosecution read the indictment, the trial was adjourned until next month.

The teenager has been detained since she was arrested on December 19, four days after she was filmed confronting the soldiers outside her West Bank home.

Israel has treated her actions as a criminal offence, indicting her on charges of assault and incitement that could potentially lead to years in prison.

But her supporters see a brave girl who struck two armed soldiers outside her West Bank home in frustration after having just learned that Israeli troops had seriously wounded a 15-year-old cousin, shooting him in the head from close range with a rubber bullet during nearby stone-throwing clashes.

The teenager with a large curly mane of blonde hair, who turned 17 in jail last month, has become the latest symbol of the long-running battle between Palestinians and Israelis over global public opinion.

Israel's full-throttle prosecution of one of an estimated 300 Palestinian minors in Israeli jails, and a senior Israeli official's recent revelation that he once had parliament investigate whether the blonde, blue-eyed Tamimis are a "real" Palestinian family, have helped stoke interest in the case.

It has also underscored what Palestinians say constitutes legitimate resistance to Israel's rule, now in its 51st year after Israel captured the West Bank, Gaza Strip and east Jerusalem in 1967.

International human rights groups have criticised the aggressive prosecution, and diplomats from the European Union and several European countries, including Germany and the Netherlands, attended Tuesday's hearing as observers before they were kicked out along with journalists.

In his decision, the judge, Lieutenant Colonel Menachem Lieberman, said the trial would remain closed for Tamimi's own protection.

"I didn't think it's good for the minor that there are 100 people in the courtroom," he said.

Her Israeli lawyer, Gaby Lasky, objected, saying the family wants the proceedings to be public. She accused the court of closing the proceedings to prevent the world from watching.

"The court decided what is best for the court, and not what is good for Ahed," she said.

"The way to keep it out of everybody's eyes is to close doors and not allow people inside the court for the hearing."

She said her strategy would be to argue that Israel's continued occupation over the West Bank, captured in the 1967 Middle East war, is illegal and that the indictment is aimed at deterring the teenager and other Palestinian youths "from resisting occupation non-violently".

"It is a trial of occupation. This is a court of occupation, and Ahed was resisting occupation," she told reporters outside the courtroom.