At the end of 2017, during widespread protests against US President Donald Trump's recognition of Jerusalem as Israel's capital, two Palestinian teenagers had run-ins with Israeli soldiers that went viral.

Fawzi al-Junaidi was pictured blindfolded and surrounded by over 20 Israeli soldiers, his arms locked behind him as he was dragged away.

The 16-year-old spent three weeks in detention and was released on bail, bruised and with a dislocated shoulder.

{articleGUID}

Ahed Tamimi was also 16 when she was arrested at her home in the middle of the night by Israeli troops in riot gear. She turned 17 in an Israel detention facility, where she's been held since December 19.

While Fawzi and Ahed have become symbols of Palestinian resistance, they're also minors navigating a military detention system that's been repeatedly accused of systematic abuse.

The pair is not alone.

The Israeli army arrested 1,467 Palestinian minors in 2017, according to local prisoner support and human rights group Addameer.

Defense for Children International-Palestine (DCIP) says between 500 and 700 Palestinian children are prosecuted in Israeli military courts every year.

So, how does the system work?

Arrests

The West Bank, except for East Jerusalem, has been under Israeli military law since 1967. Palestinians living in the West Bank are subject to this law, while Israeli citizens living in illegal settlements in the occupied West Bank fall under Israeli civilian law instead.

Under military law, minors as young as 12 can be arrested, most for stone-throwing, which the Israeli army considers a "security offence". The offence can get up to 20 years in prison, depending on the minor's age.

Many of the accused are arrested in night raids by armed Israeli soldiers and held in detention pending prosecution in military courts.

"It can be 3am or 2am ... Suddenly and without any previous alert, they just go inside the house and put all the members of the family in one room and then ask for the specific child that they want," explains Farah Bayadsi, a lawyer with DCIP.

The United Nations Office for the Coordination of Humanitarian Affairs documented around 336 night raids by the Israeli army in January 2018 alone.

"It's a method to terrorise the youth and to make sure that system of control is asserted on people at a young age," says Addameer's Dawoud Yusef.

In testimonies collected by DCIP, minors reported the uses of handcuffs and blindfolds, as well as physical and verbal abuse during their arrest and transport.

"It starts from the very first minute of the arrest, and it may continue for four to five hours, and sometimes six hours," Bayadsi tells Al Jazeera, continuing, "Until they get to the interrogation centres."

Interrogation

Minors arrested during night raids arrive at interrogation centres tired and disoriented and suffer abuses, reported by advocacy groups, including depriving those arrested of food, water, and access to toilets during questioning.

Physical and verbal abuse, sleep deprivation, humiliation, threats of sexual assault, and threats against the child's family have also been documented.

These interrogations can span hours at a time, and, while minors in military detention are legally entitled to certain protections, they're not being upheld.

{articleGUID}

According to Israeli military order 1745, audio-visual recordings of interrogations with minors must be filmed, except when the minor is accused of committing a "security offence", like stone-throwing, which is the most common charge brought against Palestinian minors.

The right of parents to know their child's whereabouts, introduced in 2011 through military order 1676, is also often neglected. Parents are supposed to be presented with a form written in Arabic, detailing why their child is being arrested and where they're being taken.

But testimonies collected by DCIP showed that parents weren't notified in most cases that were sampled.

In the few times where the form was presented, it was in Hebrew.

While children have the right to a lawyer under the same military order, few actually get one. Ninety-seven percent of the minors DCIP interviewed were denied access to legal counsel before and during interrogation.

Children between 12 and 16 need to be brought to a judge within two days of arrest, and, for 16- and 17-year-olds, it's four.

"We only see the children in the court after they've taken the 'endless hell' journey," says Bayadsi.

"We hear about the violations committed against them in the court hall."

While they wait for court hearings, which can take months, the children are kept in detention.

According to DCIP, 19 percent of children the group interviewed in 2017 reported being kept in solitary confinement, for an average of 12 days. The longest period of isolation documented was 23 days.

Many minors end up signing confessions, which are often written in Hebrew, a language most Palestinian children don't understand.

Despite this, the confessions can still be used as evidence in court.

Military trials

Minors in the occupied West Bank are tried in military juvenile courts, which were set up in 2009 in response to widespread criticisms of Israel's ill-treatment of minors.

The courts have certain requirements, like specially trained judges and closed-door hearings, but the requirements only deal with the trial process.

Most abuses documented against children happen during their arrest and interrogation, before a trial starts.

Imprisonment of minors after conviction is not used as a last resort, as it should be in accordance with the Convention on the Rights of the Child, which Israel has signed.

The last conviction rate released by the military courts was 99.74 percent.

In a system where the judge, prosecutor, and even witnesses - in cases where a soldier is called to give evidence - are all members of the Israeli army, most children end up taking plea bargains.

"Let's say that you seek to go against the charges, you seek to have a full, fair trial process. The military prosecutor will say, 'Ok, well, let's seek the full sentence,'" Yusef explains.

A full sentence for stone-throwing could be months or years, depending on the minor's age.

"So when you're staring down a full sentence, with a 99.74 percent conviction rate, the military prosecutor will say, 'How about I give you a few months, if you just plea?'"

And once a plea bargain is taken, the children are taken to prison.

Jail

While tried in military juvenile courts, 16- and 17-year-olds like Ahed and Fawzi are considered adults under Israeli military law, which means that they're sentenced as if they are adults.

Ahed Tamimi has been indicted on 12 counts, which could put her in an Israeli prison for 10 years.

While her trial is under way, Ahed is being held in HaSharon prison, one of the three prisons where Palestinian minors are kept, along with Megiddo and Ofer.

But two of the three are in Israeli territory, which is a violation of Article 76 of the Fourth Geneva Convention.

Keeping minors outside of the occupied territories means that family visits are difficult and rare.

Family members with West Bank IDs have to apply for entry permits into Israel, which can take months to process, while others are refused on undisclosed "security grounds".

If a permit is received, a brief encounter with the minor separated through a glass barrier can take an entire day because visitors must go through several checkpoints and security checks.

Minors aren't just spending weeks or months away from family; they also miss out on a proper education.

Teaching in prisons is lacking, with only two classes offered: Maths and Arabic. The Israeli Prison Service prohibits the teaching of other subjects, such as Geography or Islamic Studies, citing "security concerns".

Classes in prisons where both adults and minors are being held together tend to be taught by older inmates.

Once released, studies show a 40 percent drop in school performance, with some former child inmates dropping out.

However, a lack of educational infrastructure isn't the only reason.

Post-detention

A 2012 report showed that almost half of the children interviewed were mentally withdrawn after their arrest, with around 80 percent suffering from insomnia and 90 percent developing anxiety.

"When those kids are released they feel alienated into their own society ... being unable to concentrate on their studies, difficulty in their sleeping pattern and their appetite, they experience depressive symptoms, and are watchful and detached from reality," says Khader Rasras, director of the Treatment and Rehabilitation Centre for Victims of Torture in Ramallah.

Ex-detainees show different signs of trauma, like developing eating disorders, bedwetting, having nightmares, increased aggression, and a loss of motivation.

Addameer's Dawoud Yusef recalls working with a child called Shadi from East Jerusalem whose experience of arrest, despite being processed through Israeli civilian courts, disrupted his growth.

When those kids are released they feel alienated into their own society ... being unable to concentrate on their studies, difficulty in their sleeping pattern and their appetite, they experience depressive symptoms, and are watchful and detached from reality. Khader Rasras, Treatment and Rehabilitation Centre for Victims of Torture

"The time that he wasn't able to get education affected him profoundly. This notion that he now had to be strong, he had to now be all these things, and face up to the occupation because the occupation had come down so hard on him. It really just destroyed any semblance of a child," Yusef says.

"And speaking to Shadi, we couldn't speak past tomorrow. Asking him what he wanted to do with his life, asking him what he wanted to be, asking him about realising some kind of future for himself; he just couldn't. It was day-to-day struggle for Shadi after that."

Shadi was eventually kicked out of school for fighting.

"These experiences don't help the kids focus on their academics," says Rasras.

"Rather, they shift their concentration to other issues like looking back into their own traumatic experience and feeling that the world isn't as safe as they once thought."