By Luke Baker
JERUSALEM (Reuters) - If there were a heat map showing instability in the Middle East, the area around most of Israel's borders would have turned a steadily deeper shade of red over the past few years.
With attacks by Hezbollah from Lebanon, the threat from Islamic State and the Nusra Front in Syria and growing unrest in Egypt's Sinai, the north and south are on edge. By comparison, the eastern frontier with Jordan looks like an oasis of calm.
Yet the Hashemite kingdom, wedged between Iraq, Syria and Saudi Arabia as well as Israel and the Israeli-occupied West Bank, is tackling an array of destabilizing problems that its allies - in particular Israel - are watching warily.
Around 2,000 Jordanians have gone to join militant groups in Syria, one of the largest contingents of foreign fighters, with concerns that at least some will return home radicalized. Abu Musab al-Zarqawi, who sowed chaos in Iraq and inspired the emergence of Islamic State, came from Zarqa in northern Jordan.
As well as poor tribal communities, the kingdom is home to an estimated 3-4 million Palestinians, more than half its total population. Most have been registered as refugees for 65 years, share family ties with the 2.6 million Palestinians in the West Bank and yearn for a return to what was Palestine.
It has also taken in more than one million people displaced by the wars in Iraq and Syria, putting huge strain on resources and government finances, to the frustration of many Jordanians.
And the Muslim Brotherhood, which shares its Islamist ideology with Hamas, the dominant force in Gaza and a growing presence in the West Bank, is the largest political party in the kingdom, even if its popularity looks to have peaked.
No one is predicting serious trouble in Jordan, with its well-trained military, skilled intelligence agency, financial support from the United States and a Sunni Muslim monarch who balances internal security with a degree of political freedom.
But as the neighbors prepare to mark the 20th anniversary of their landmark peace agreement on Oct. 26, Israel is keener than ever to ensure Jordan's delicate situation is shored up and that the security each provides to the other is maintained.
"The concern is that if a change in the regime in Jordan takes place, then we have the longest border to Israel with Jordan and we may lose one of the two pillars of our Middle East strategy, which is peace with Jordan and Egypt," said Amos Yadlin, director of the Institute for National Security Studies in Tel Aviv and a former head of Israeli military intelligence.
Yadlin sees only a slim chance - 10 to 15 percent - of Jordan becoming more hostile, and he still regards Iran's nuclear program as the greatest threat to Israel. But he sees a strong Jordan as critical to his country's security.
"The rules of the game are that we don't want to get into what we have seen in Iraq and what we are seeing in Syria or in Lebanon," he said, referring to authoritarian policies that have fueled conflict there and how Jordan has been restrained.
"(The Jordanians) prefer to have a more moderate way of behavior to keep stability in Jordan."
While Israel's peace with Egypt came first - in 1979 - the accord signed with Jordan in 1994 has delivered far deeper cooperation on intelligence and security and become a firm backbone for relations, analysts and officials say.
On the economic front, trade has picked up and Israel recently agreed to supply Jordan with natural gas in a deal estimated at $15 billion, although Jordanian businessmen say a lack of progress on peace between Israel and the Palestinians has held back commercial ties.
"Jordan wants its relationship with Israel, it just doesn't want to talk about its relationship with Israel," is how one Israeli diplomat put it.
Jordanian officials were not immediately available for comment. They often express strident criticism of Israel, citing the high civilian death toll during the war against Hamas in Gaza as an example of action they say fuels the very extremism the Israeli government fears.
"If we as a Jordanian state in cooperation with an Arab and Islamic coalition are fighting extremism within Islam, and the Israelis are killing our people in Gaza and Jerusalem every five minutes, then this is a problem," King Abdullah said on Monday.
Israel says it shares intelligence it gathers on militant activity in southern Syria with Jordan and that there is close monitoring of Islamist factions in both Jordan and the West Bank to ensure coordination and that neither side is surprised.
"It is a very important relationship for Israel," said Nathan Thrall, a Middle East analyst with the International Crisis Group. "It's keeping Israel safe on its eastern border, there is very intense intelligence cooperation and Jordan has probably the best intelligence service in the region."
A U.S. general has even proposed that Israel upgrade its anti-missile systems to include Jordan under its umbrella, while there are reports of Israel quietly transferring military equipment it no longer uses to its neighbor.
"There's a concern in Jordan that Islamist power in the West Bank, or Hamas coming to power in the West Bank, could have very negative repercussions in Jordan," said Thrall.
"If you talk to Israeli defense officials, what they will say quite bluntly is that Jordan is acutely aware that its security is essentially guaranteed by Israel right now," he said, referring to the threat from Palestinian militancy.
Speaking ahead of the anniversary of the peace accord, Israel's ambassador to Jordan, Daniel Nevo, indicated just how important strategic relations were while being coy about them.
"We share a long border, there is cooperation I will not speak about and with which I am not fully familiar, which I also do not want to know about," he told Yedioth Ahronoth newspaper.
"Jordan is an Israeli interest and vice-versa, even if that is uncomfortable for some people."
ECONOMY UNDER STRAIN
The strongest demonstration of Israel's willingness to come to Jordan's defense came in 1970, during what is known as Black September, when the Palestine Liberation Organisation in Jordan rose up against King Hussein and hundreds were killed.
Syria sent troops and tanks into Jordan in support of the Palestinians, at which point Israel made clear its readiness to defend the kingdom and together with the Jordanian air force swiftly repelled the advancing Syrian brigade.
The principles that guided Israel's actions 44 years ago are the same now, said Yadlin, the former intelligence chief.
But rather than an invading army or Islamic State trying to take over the country, the threat is more about the risk of internal destabilization caused by Islamist cells or agitation within the refugee population - in particular Palestinians in urban camps - that is then exacerbated by economic factors.
Israel also worries that if faltering peace talks were eventually to lead to the creation of an independent Palestinian state in the West Bank, Gaza and East Jerusalem, Jordan's vast Palestinian population might try to extend it.
Jordan, on the other hand, says an independent Palestine would be a force for stability and has repeatedly pressed Israel to grant Palestinian refugees in Jordan the right of return.
"Privately, Israeli officials will tell you that they are more worried about Jordan than anything," said Thrall. "It's less of an assessment of impending doom and more of a comment on how essential Israel sees the survival of the Hashemite regime."
The key to its survival in the long run may have as much to do with economics as defense and security. Jordan's budget is under strain, it imports virtually all its energy requirements and it is having to cope with a draining humanitarian crisis.
While Israel may have Jordan's back and it is a bulwark on Israel's flank, dollars may be its greatest need.
The United States already provides around $1 billion a year and a further $1 billion in loan guarantees is possible. Given the conflagration in the region, the pressure on its borders and the domestic situation, further help may be necessary.
"The main things Israel can do to help Jordan are to lobby for it to be bolstered financially by the United States and for the U.S. in turn to lobby various Arab states to help Jordan financially," said Thrall, highlighting the threat of economic problems exacerbating the threat from the Syrian refugee crisis.
(Additional reporting by Dan Williams and Maayan Lubell in Jerusalem and Suleiman al-Khalidi in Amman; editing by Philippa Fletcher)