Suffering from injuries, Fawzi al-Junaidi, 16, is released from Israeli detention and will face trial in January 2018.

A 16-year-old Palestinian boy, who appeared in a photo that was condemned as representative of the Israeli army’s use of excessive force, has been released on bail after being detained for three weeks.

Fawzi al-Junaidi, who was photographed, blindfolded and surrounded by more than 20 Israeli troops, in the occupied West Bank city of Hebron, was charged with throwing stones at a group of soldiers earlier this month.

The teenager has repeatedly denied the allegations and said he was ambushed while running away from the area where there were sound bombs and tear gas canisters.

His family and lawyers told Al Jazeera that he is suffering from a dislocated shoulder and bruises.

Rashad al-Junaidi, Fawzi’s uncle, said that he was released late on Wednesday night.

“When we picked him up from Ofer prison, we rushed him to Ramallah hospital, and it turns out that his right shoulder is broken … His entire body is bruised,” his uncle said.

“Thank God, a hero is unbreakable,” he added, referring to al-Junaidi’s morale.

Al-Junaidi was arrested amid ongoing protests across the West Bank, East Jerusalem and the Gaza Strip over a US decision on December 6 to recognise Jerusalem as the capital of Israel.

His family say he was not protesting and was only out to buy groceries as the main provider for the family of nine. His father has a leg injury, and his mother is fighting a terminal illness.

The child was discharged from the hospital on Thursday and is now home with the rest of his family.

“He is strong and persistent and has made us proud for being resilient throughout this all … we will continue to keep an eye on his condition because the health situation is dire,” he uncle said.

“His return has overwhelmed us with so much joy that we couldn’t stay on our feet. It’s an indescribable feeling especially since Fawzi was never forced to part from his mother and father for this long,” he added.

The decision to release him was threatened with an appeal that was retracted “at the last minute”, his lawyers said. The appeal would have prolonged his detention period indefinitely while he was in desperate need of medical attention.

The al-Junaidi family struggled financially but eventually managed to gather the bail sum of 10,000 shekels ($2,870).

“I gave what I was able to offer, and the rest was provided to us in loans by our loyal friends and brothers,” Rashad explained.

Al-Junaidi will face trial for the charges against him on January 14. His bail comes with conditions, including a requirement that he attends every court case scheduled to take place.

Thrown into ‘a tub of cold water’

Arwa Hlehel, one of the two lawyers representing al-Junaidi, said that when she last visited him in prison, the teenager was “very upset” because he had not been able to see a doctor, despite asking several times.

“He said he was still experiencing severe chest pain from when he was beaten at the time of his arrest,” she said.

At his first hearing before an Israeli military court, al-Junaidi said he was beaten with a rifle and by almost every soldier who took him.

“At one point he hid under the desk in the detention centre, and they pulled him back up and continued to excessively hit him … They then threw him into a tub filled with cold water and took his shoes off,” she said.

“So practically, we’re talking about abuse that has reached the level of torture, especially for a child his age.”

Hlehel, who works with the Hebron-based Palestinian Prisoners Club, is now working on submitting a complaint to the United Nations special rapporteur about the Israeli army’s treatment of children.

“The complaint should be ready for submission on Sunday,” she said. “We hope that this would bring to light violations that are in direct contravention of international law.”

The viral image of al-Junaidi was widely denounced as it was shared on social media over the past three weeks.

The photo shows al-Junaidi looking disoriented, wearing a grey shirt and ripped jeans as dozens of soldiers crowd around him carrying guns and wearing protective gear, including helmets and knee pads.

‘Policy of medical negligence’

It is customary for Palestinians to be detained for up to months at a time until they face trial.

Al-Junaidi’s lawyer, Farah Bayadsi, told Al Jazeera that the release was likely because of the child’s deteriorating health.

“His prolonged detention can be attributed to the Israeli obstructionist policy of medical negligence,” said Bayadsi, who works under the Defence for Children International – Palestine (DCIP).

“It [the appeal] was just a legal procedure to further infringe on Fawzi’s rights,” she added.

Bayadsi says testimonies of four Israeli soldiers who allege seeing al-Junaidi throwing stones are inaccurate.

“Their statements are vague and refer to four other people who happened to be in the area … they don’t even refer to Fawzi’s role specifically,” she said.

“Even after his arrest, the way they investigated his case was biased and unfair.”

Arrests since US Jerusalem move

Earlier this month, US President Donald Trump announced said his administration would be moving its embassy from Tel Aviv to Jerusalem, prompting international condemnation and widespread protests across the world.

The status of Jerusalem is extremely sensitive and is one of the main sticking points in efforts to resolve the Israeli-Palestinian conflict.

Palestinian leaders want occupied East Jerusalem as the capital of a future state, while Israel says the city cannot be divided.

In the occupied West Bank and East Jerusalem, demonstrations have been met with violence by Israeli forces, who fired live ammunition, dispersed tear gas canisters, and carried out a wave of arrests against protesters.

At least 15 Palestinians have died in the clashes following the announcement.

According to the Palestinian Prisoners Club, Israeli forces have arrested more than 600 Palestinians since Trump’s announcement.

These include 163 children who are often exposed to beatings and excessive force when being arrested.

Prior to the latest wave of demonstrations, another 320 Palestinian children were arrested. They are still held in Israeli prisons and detention centres.

A “big” arrest campaign usually takes place two weeks following major protests across the West Bank and East Jerusalem, Addameer, a Ramallah-based prisoners’ rights group, previously revealed to Al Jazeera.

“When international media attention dies down, and when protests are suppressed, arrest campaigns take place,” Addameer’s Lana Ramadan, said.

Since the announcement, more than 2,900 people have been left injured, and more than 500 have been jailed.