“I was dreaming that I was going to be martyred,” she said. She said she had been influenced by other young Palestinians who stabbed or tried to stab Israeli soldiers and civilians. The wave of attacks, now sputtering, began last year.

The surge of very young people trying to commit very violent crimes has posed a challenge for the Israeli military authorities, who for years had vowed to change their system of prosecuting and incarcerating Palestinian minors in the West Bank. It is a far harsher system than the one used for dealing with young Israeli offenders and Palestinian residents of East Jerusalem.

After her detention, Dima was interrogated without her parents or a lawyer present. She said she had been yelled at during her interrogation and attended six court sessions with her feet in shackles, causing her to develop a limp. Prison itself, she said, was fine because she was allowed to play with other incarcerated girls.

There were 422 Palestinian minors in Israeli jails in December, according to Defense of Children International-Palestine, which works to help incarcerated Palestinian minors. The group said that figure was the most recent one from Israel’s prison service.

About 100 of the minors were under 15, and most were boys, the group reported. By comparison, 195 minors were incarcerated in December 2012, the group said.