A Hebron University student who attempted to bomb the Jerusalem light rail last month sneaked into the capital through a valley east of the city, police revealed Tuesday.

On July 15, Ali Abu Hassan entered Israel through a valley outside of the eastern Tsur 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.

He was armed with three pipe bombs he had linked together into one large explosive and had covered with nails and screws dipped in rat poison. “In his bag there were also two knives and a cellphone,” police said Tuesday.

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

Hassan 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 a joint Shin Bet-Israel Police investigation.

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 neighborhood of Jabel Mukaber, police said.

“Before he entered Israel, he wrote a final testament, which he left at the university and asked his friends to deliver to his parents,” police said.

While in the olive grove, he shaved off his beard and changed into shorts and a T-shirt to better blend in with the Jerusalem population.

On July 17, Hassan took a bus to the center of the capital and walked along Jerusalem’s popular Jaffa Road to find a target for his bombing, before stopping near the intersection with King George Street.

According to investigators, 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, Hassan changed his target.

When he attempted to board the tram, he was stopped after he raised the suspicions of a security guard. When the guard asked to examine the contents of the bag, he noticed the bomb and called the police.

Sappers were promptly deployed to the scene and the road was closed off, along with the adjacent King George Street.

A video from the scene showed police pointing their guns at the suspect, who lay on the ground near the train stop. A second clip showed sappers strip-searching him, apparently for explosives.

On Tuesday, an Israeli court charged the 21-year-old Palestinian man with attempted murder, creating a weapon and conspiracy to commit a crime.

Times of Israel staff contributed to this report.