The Jerusalem District Court on Wednesday indicted two Palestinian teens on charges of attempted murder for allegedly stabbing an Israeli teen outside the Old City of Jerusalem last month.

The 14- and 16-year-old from the East Jerusalem Shuafat refugee camp were also indicted for possession of knives.

According to the indictment, the two were motivated to carry out the attack after watching online videos portraying Israeli security forces inappropriately searching Palestinian women during security checks.

On the morning of January 30, they each bought a 10-centimeter knife from their neighborhood store before heading to the Old City. After praying at the Al-Aqsa mosque, the teens recruited another Palestinian youth, an 11-year-old-boy, to join them in carrying out the attack. He armed himself with a crowbar.

The three went to Damascus Gate and waited for Jews to walk by.

Shortly after 5 p.m., the three attacked two ultra-Orthodox teens returning from prayers at the Western Wall.

Image of a suspect in a stabbing attack on an Israeli teenager at Damascus Gate on January 30, 2016 (Courtesy)

Image of a suspect in a stabbing attack on an Israeli teenager at Damascus Gate on January 30, 2016 (Courtesy)

“It seemed like they wanted to kill us,” the 17-year-old victim said of the attack. “I didn’t see them come at me, and I only realized I had been stabbed when I saw blood and them running away.”

His friend managed to escape and alert nearby police officers. The wounded youth was taken to Hadassah Hospital on Mount Scopus for treatment for stab wounds in his back.

The suspects eventually turned themselves in to police after seeing security camera footage of them aired on television.

While the victim cannot be named due to laws prohibiting directly identifying minors involved in crimes, he was identified as an ultra-Orthodox teen from Brooklyn, New York, who moved to Israel several months ago in order to join the IDF.

After the attack, he told reporters from his hospital bed that the attack would not deter him from his upcoming enlistment in the army. He told the Ynet news site he hoped to join the ranks of the IDF’s elite Sayeret Matkal commando unit.

“I was stabbed, but I’ll still enlist in the army and give it my all,” he said. “I’m not afraid of anything.”

The attack — part of a months-long wave of deadly Palestinian car-rammings, stabbings and shootings — came days before an Israeli border policewoman was killed by Palestinian assailants in the same area.