The shooting death of a Jordanian judge by Israeli border guards this week has triggered an outpouring of anger in this kingdom, shaking ties between the two countries at a time when the United States is counting on Jordan’s help in brokering a Middle East peace deal.

Raed al-Zaytar, a 38-year-old Amman magistrate of Palestinian origin, was fatally shot by Israeli border guards on Monday at the Allenby Bridge crossing that links Jordan and the West Bank. The Israeli military said the judge attacked its forces with a metal pole, attempted to seize one soldier’s rifle and shouted “Allahu Akbar,” Arabic for “God is great.” In a statement, the military referred to him as a “terrorist.”

Israel on Tuesday issued a statement of regret and announced a joint investigation of the shooting in a bid to ease tensions between the neighboring nations. But the moves have done little to quell an eruption of anti-Israel sentiment across Jordan.

In the days since the shooting, hundreds of Jordanians across the country have held protests and candlelight vigils, and demonstrators in Amman attempted to storm the Israeli Embassy twice in a 24-hour period.

“Judge Raed was a good and honest person minding his own business when the Israelis decided to take his life without a trial or real reason,” one protester, Mohammed al-Oathman, said Tuesday outside the embassy, where demonstrators were calling for an end to a 1994 peace treaty between the two countries.

The incident occurs at a sensitive time for Jordanian-Israeli ties, which have been strained in recent months by growing fears in Jordan that U.S.-backed peace talks between Israel and the Palestinians could lead to the permanent settlement of Jordan’s 2-million-­strong Palestinian refugee population. Jordanians have also been angered by the debate among Israeli lawmakers about allowing Jewish prayer at the Temple Mount in Jerusalem, which houses the al-Aqsa mosque, a Muslim holy site of which Jordan is the custodian.

“Politically, Israel has been pouring gasoline on the Jordanian street,” said Saad al-Zuwaideh, a Jordanian lawmaker and tribal leader. “With Monday’s killing, they just lit the match.”

Jordanian lawmakers met Wednesday for a long, emotionally charged debate on possible retaliatory measures, including annulling the peace treaty and declaring jihad, or holy war, against Israel.

In the end, the lawmakers voted overwhelmingly for a measure giving Prime Minister Abdullah Ensour’s government a one-week deadline to expel the Israeli ambassador from Amman or face a vote of no confidence. Ensour was appointed by King Abdullah II.

“Israel has shown time and time again that it does not respect the peace treaty,” said Zakaria al-Sheikh, a lawmaker who voted in favor of the measure. “After this crime, we must make it known that neither do we.”

Jordan and Israel share deep security interests, making the peace treaty, though unpopular, likely to survive the diplomatic and political fallout from the shooting. But there may yet be repercussions on Secretary of State John F. Kerry’s effort to strike an Israeli-Palestinian peace deal.

Analysts say Jordan, a key facilitator and advocate of the peace process, may respond to the uproar by publicly distancing itself from the Kerry talks.

“The Israelis have mortally wounded the peace camp and those trying to convince the Jordanian public of the need for peace,” said Hassan Barari, an Amman-based expert in Arab-Israeli relations.

The shooting has also served to re-energize Muslim Brotherhood-led opposition in Jordan, which has seized on the incident to depict the government and the royal palace as out of touch with the public.

For the moment, Abdullah, who retains the sole authority to approve the expulsion of the Israeli ambassador, finds himself torn between a public demanding justice and the chance to help secure a peace deal.

“The king is now trying to take a position that both unites the Jordanian people and enshrines his status as a peacemaker,” Barari said.