AMMAN, Jordan — A Jordanian court on Monday sentenced a man to eight years in prison for allegedly plotting to attack the Israeli embassy in Amman last year.

The state security court ruled that Khaled Abu Raya “threatened to carry out terrorist acts.”

According to the charge sheet the 33-year-old Jordanian planned “to open fire on the embassy and its employees in a bid to kill a large number of Israelis.”

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

The plot was alleged to be in response to the transfer of the US embassy from Tel Aviv to the disputed city of Jerusalem in May 2018, a major policy shift that outraged Palestinians and Arabs.

According to the charge sheet, it was also motivated by Israel’s policies vis-a-vis Gaza Strip which has been rocked by anti-Israeli protests since March last year.

The same court also sentenced another Jordanian, Munir Ibrahim, to three years in jail on Monday for allegedly planning to infiltrate Israel and attack soldiers in the Jewish state.

Illegal crossings of the tightly secured border between Jordan and Israel are rare.

Earlier this month, Jordan referred an Israeli to court on charges of illegally entering the kingdom and possessing drugs.

Ties between the two countries, which are bound by a peace treaty, have been cool in recent years amid disagreements and issues linked to the Israeli-Palestinian conflict.

Times of Israel staff contributed to this report.