A Hebron University student who was caught trying to board the Jerusalem light rail while carrying three pipe bombs, explosives and knives was convicted on Thursday of attempted murder, manufacturing weapons and entering Israel illegally.

In its ruling, the Jerusalem District Court said that 20-year-old Ali Abu Hassan“planned to carry out a mass terror attack.”

In July 2016, Abu Hassan entered West Jerusalem through a valley outside the eastern Sur Baher neighborhood, with the intention of carrying out an attack in the capital as a form of “revenge for visits by tourists and Israeli Jews to the Temple Mount,” police said in a statement at the time.

Get The Times of Israel's Daily Edition by email and never miss our top stories Free Sign Up

On July 17, he took a bus to the center of the capital and walked along Jerusalem’s bustling Jaffa Road to find a target for his bombing, armed with three pipe bombs he had linked together into one large explosive and covered with nails and screws he had dipped in rat poison. In his bag police also found two knives and a cellphone.

He originally intended to attack a restaurant on Jaffa Road and scoped out the area to prepare for his assault. However, when he noticed the large number of passengers boarding the light rail that runs through downtown, he changed his target.

During his attempt to board the tram, he aroused the suspicion of a security guard and was stopped. When the guard asked to examine the contents of the bag, he noticed the bomb and called police.

The court praised the security guard for stopping Abu Hassan right before he boarded the tram, saying it was only due to his alertness that a large-scale attack was prevented. Judges also ruled that the remorse he displayed in court wasn’t genuine, since he didn’t voice it during his interrogations.

Hassan had researched how to make a pipe bomb that would “cause the most, and most effective, damage” on the internet and “even carried out test explosions with a number of bombs in order to check them before entering Israel,” according to the joint Shin Bet-Israel Police investigation into the attempted attack.

He worked alone, without any “organizational infrastructure,” police said.

The civil engineering student came from Bayt Ula, a village northwest of Hebron, and hid out in an olive grove near the East Jerusalem neighborhood of Jabel Mukaber, police said.

The judges convicted Abu Hassan of attempted murder, manufacturing weapons, carrying weapons, carrying a knife, and four counts of entering Israel illegally.

Judah Ari Gross and Times of Israel staff contributed to this report.