A diplomatic standoff between Israel and Jordan over a deadly shooting at Israel’s embassy in the kingdom once again tests the strategic, if turbulent ties forged in a 1994 peace treaty.

In the past, Israel was willing to pay a high price to protect the relationship, including releasing an Islamic militant leader from prison in a deal with Jordan.

Jordan and Israel share a long border, various water and natural gas projects, and cooperate to stem Iran’s growing influence and the spread of Islamic State militancy in the region.

But the peace agreement remains deeply unpopular in the kingdom, where many citizens are of Palestinian origin and say normalization can only come after Israel reaches peace with the Palestinians.

Here’s a look at the Israeli-Jordanian relationship.

——

ATTEMPTED ASSASSINATION

Perhaps the most serious crisis came in 1997, during Benjamin Netanyahu’s first term as Israeli prime minister. At the time, agents of Israel’s Mossad spy agency tried to assassinate then-Hamas chief Khaled Mashaal in Amman. Two agents entered Jordan using fake Canadian passports and poisoned Mashaal as he was leaving the Hamas offices in the Jordanian capital by placing a device near his ear. They were captured shortly after the attack. Outraged by the violation of his sovereignty, Jordan’s then-King Hussein threatened to void the still-fresh peace accord if Mashaal were to die. Israel ultimately dispatched an antidote that saved his life and the Israeli agents were returned home. Under pressure, Israel agreed to release the spiritual leader of Hamas, Ahmed Yassin, from prison.

JORDAN VALLEY SHOOTING

Earlier in 1997, a Jordanian soldier opened fire at a group of Israeli schoolgirls on a field trip to a joint Israeli-Jordanian tourist resort along the border. A few days after the shooting, King Hussein traveled to Israel to comfort the families of the seven slain girls, in what was seen at the time as a touching gesture to Israel that helped solidify his image as a man of peace. The soldier was released from prison earlier this year, after serving 20 years.

HAR HABYIS

The Har Habayis, has been a frequent source of friction.

Jordan serves as Muslim custodian of the 37-acre walled compound, the third holiest site of Islam.

 

In 2014, Jordan temporarily recalled its ambassador amid Jewish-Muslim tensions over prayer rights at the site. In a sign of the importance Israel places on its ties with Jordan, the Israeli government moved quickly to restore calm.

The following year clashes between Palestinians and Israeli security forces around the site quickly led to unrest elsewhere in Jerusalem, across Israel and in the West Bank that have continued intermittently till now.

Over the past week, Jordan was heavily involved in trying to defuse an escalating crisis between Israel and the Muslim world over metal detectors installed at the shrine. Israel set up the security measures in response to a shooting attack from there earlier this month that killed two Israeli policemen.

ISRAELI EMBASSY SHOOTING

On Sunday, an Israeli security guard at the Israeli Embassy in Jordan opened fire and killed two Jordanians, after one of them attacked him with a screwdriver. The Israeli guard was lightly wounded. The incident led to a diplomatic standoff, with Jordan saying it would not let the guard leave without an investigation. A day later, embassy staff remained in the compound, as Netanyahu tried to defuse the crisis and get the guard back to Israel. The incident came at the worst possible time for Israel, complicating efforts to find a way out of the standoff over the metal detectors at the Jerusalem site.

SECURITY TIES

Israel and Jordan share intelligence and have overlapping interests in southern Syria and elsewhere. Israel also considers Jordan an important land barrier on its eastern flank. The stability of the U.S.-allied kingdom is seen in Israel as a major security interest.

Previous crises have shown that both sides are willing to make gestures to maintain the relations.

“The incident in Jordan has a potential of disrupting the relations between the two countries,” said Oded Eran, a former Israeli ambassador to Jordan.

“However, the two countries have an interest to let this incident be solved in a very amicable way, providing that the two states can keep the perception of guarding their national interest,” he said.