The Hashemite Kingdom of Jordan faces a precarious internal security situation due to the multiplicity and ubiquity of potential terrorist threats against the Hashemite regime emanating from both ISIS and al Qaeda. Some of the millions of Syrian and Iraqi refugees, who live in refugee camps in Jordan, could be easily recruited by these two terror networks.

The roots of militancy are deep in Jordan. The founder of the Iraqi branch of al Qaida, Abu Musab al-Zarqawi, was a Jordanian national, and the remnants of that group gave rise to the so-called Islamic State.

And as al Qaida rebrands itself in Syria under the name of Hayat Tahrir al-Sham (HTS), it could easily find adherents in Jordan. The HTS message – indigenous, anti-regime, and less extreme than that disseminated by ISIS – makes the group appear more appealing to disgruntled, unemployed and alienated Jordanian and Syrian youth in the country.

As a new generation of Syrian youth grows up as refugees in Jordan, it becomes susceptible to radical ideologies. In a different but analogous situation, the refugee camps on the Pakistani-Afghan border gave birth to the Taliban movement in the late 1980s and early 1990s. At the time, Pakistan’s intelligence agency, known as Inter-Services Intelligence (ISI), helped create the Afghan Taliban as a countervailing force against India and other foreign players in Afghanistan.

A similar radical movement could develop in the Syrian refugee camps in Jordan, which could be affiliated with ISIS and al Qaida. If such a movement finds support among native Jordanians – Including some foot soldiers who come from rural and tribal areas – and Iraqi nationals in Jordan, the threat to the Hashemite monarchy would increase significantly in the next three to five years.

A few additional factors could make such a threat even more ominous for Jordan’s King Abdullah. First is Jordan’s close military, security, and intelligence association with the United States. Second is the recent announcement from Washington that American forces would remain in Syria for the indefinite future. Third, is the recent announcement from the Trump Administration that is planning on moving the U.S. embassy to Jerusalem by the end of 2019.

A resurgent ISIS or al Qaida affiliated group in Jordan would target both “enemies” simultaneously – Jordan as the “near enemy” and American military presence and training facilities as the “far enemy.” Terrorist groups will view the American military presence as yet another occupation of Muslim lands. Some Palestinians in Jordan, who are becoming increasingly angry at the Trump administration’s recent statements recognizing Jerusalem as the capital of Israel and moving the American embassy from Tel Aviv to Jerusalem, could also join one or both groups. They would find in ISIS or al Qaida a convenient platform from which to attack the United States and its Jordanian partners. The recent forced retirement of King Abdullah’s most senior and closest relatives within the military adds another element of threat to the regime from within the walls of the royal palace. If recent Arab media reports about power struggle within the palace are accurate, indications are that some senior members within the Hashemite dynasty seem to perceive the King’s position as becoming more precarious.

Jordan’s General Intelligence Directorate (GID) has worked very hard over the years to penetrate terrorist organizations and recruit assets from their ranks. The monarchy has used varied means in its counterterrorism strategy and has been relatively successful. Jordan has also collaborated closely with its regional and global partners in combating terrorism. Because it shares long and porous borders with Syria and Iraq, over the years Jordan has been able to cultivate contacts with Islamic activists – lawful and savory – and obtain information about possible terrorist plots against the regime – and often foil them.

Having said that, Jordan is a “rent” state, relatively poor, and in dire need of significant military and economic foreign assistance. Such assistance from the United over the years has helped enhance the country’s internal stability. American aid, however, has been a double-edge sword for the monarchy. The Jordanian public including East Bank Jordanians and West Bank Palestinians harbor much animosity for the United States because of its perceived anti-Islamic, anti-Arab, and anti-Palestinian policy. The late King Hussein, father of the present Jordanian King, could balance these different forces, which often fought against each other. He had credibility within the military, legitimacy within the East Bank tribes, and deeply-rooted Islamic credentials. He used his eloquent Arabic language speeches as a persuasive tool to connect with his people Jordanians and Palestinians. King Abdullah, unfortunately, does not possess these qualities and therefore cannot use them to expand his “soft power” with his people, thereby rendering his situation precarious.

For its part, Washington should be deeply concerned about the situation in Jordan. Our military assistance to Jordan, no matter how robust, is no substitute for the King’s need to connect with his people or to eradicate the endemic corruption in the country. American diplomacy should double its efforts to find a solution to the Syrian civil war and help devise a more stable future for Syria. Such a strategy, incidentally, will not be well-served by deploying American troops in Syria indefinitely.

If the United States is interested in the long-term stability of Jordan, Washington should find a way to dismantle the Syrian refugee camps and return the people living their to their home country. These camps have placed a heavy burden on the kingdom, and they cannot be sustained beyond a couple of years. The apparent shrinking of the American diplomatic footprint in the Levant, including in Jordan, coupled with Washington’s unwise rush to move the U.S. embassy to Jerusalem, is detrimental to Jordan in the medium-term. The situation in Jordan is unsustainable, and if it continues along this path, we should expect to see more terrorist attacks in Jordan, which could undermine King Abdallah and his regime.