Scene of the thwarted attack. (Hadas Parush/Flash90)

The Shin Bet released new and shocking details of a foiled Palestinian terror attack, which was planned in revenge for Jews visiting the Temple Mount.   

The Shin Bet (Israel’s Security Agency) on Monday revealed new and harrowing details on a potentially devastating terror attack on Jerusalem’s Light Rail system that was thwarted by vigilant security guards last month.

The terrorist, Ali Abu Hasan, 21, a resident of Beit Ula, is a civil engineering student at a university in Hebron.

He said the attack was to be carried out in revenge for visits by tourists and Jews at the Temple Mount in Jerusalem’s Old City.

He managed to slip through Israeli security by climbing up a hillside in the Jerusalem vicinity two days before the attack.

After the climb, he changed his cloths and shaved his beard into a goatee, enabling him to blend into the Israeli crowd.

Early the next morning, Abu Hasan prayed at a mosque before taking a bus to the center of Jerusalem. He initially planned to blow up a restaurant, but seeing so many people on the train, he decided to target it instead and waited at a station with a bag containing three pipe bombs and several knives.

Alert security guards spotted and approached him. After seeing the lethal contents in his bag, they tackled him while clearing the area.

Ali Abu Hassan

Ali Abu Hassan in an Israeli court. (Yonatan Sindel/Flash90)

The pipe bombs were found to be packed with nails and screws and laced with rat poison, to ensure maximum lethal effect.

The Shin Bet investigation revealed that Abu Hasan had been planning the attack for some time. He researched the internet and learned how to make pipe bombs, bought the materials and detonated several test bombs.

Before embarking on his suicidal mission, he wrote a note, which he left at the university, asking his friend to tell his parents what happened.

The Shin Bet determined that the terrorist acted on his own, without orders or guidance from any terror organization.

He will be charged with attempted murder, weapons manufacture and conspiracy to commit a crime.

His arrest has been extended to August 5.