Poor Jordan. A small, economically precarious country, it shares a two-hundred-mile border with Syria. Yet unlike Syria’s other neighbors, Turkey, Iraq, and Lebanon, it rarely gets any attention in the international press. Indeed, while the world focuses on the European Union’s controversial deal with Turkey—in which Ankara has agreed to limit the number of asylum-seekers hoping to reach Greece’s shores in exchange for a lavish foreign aid package from Europe—hardly anything has been said about this crucial American ally on Syria’s southern border. But as I observed on a recent visit, Jordan is struggling to cope with vast numbers of refugees and an alarming rise in extremism. We ignore it at our peril.

On paper, the size of the Syrian influx should have turned Jordan into a basket case. The Hashemite Kingdom has a per capita GDP of just over $5,000, and its official youth unemployment rate is around 30 percent. Though it is about half the size of Oklahoma, it has received perhaps three quarters of a million refugees since the war began—there are some 630,000 registered with the UN, but many more according to the authorities—meaning that Syrians now constitute about a tenth of Jordan’s population of 6.4 million. This is on top of a very large wave of Iraqis who came during the Iraq War a decade ago. How to feed this many, and provide them with potable water? How to school them, and how to employ them, especially when Jordanians themselves have trouble finding work?

And yet the kingdom has weathered the refugee crisis surprisingly well. Installing myself on the visitors’ sofa at a research institute in Amman last month, I was served tea by a middle-aged man whose unobtrusive demeanor led me to not take much notice of him. Soon the director swept in, and we found ourselves immersed in an animated discussion about Jordan and the stresses it faces. “Well, look at the man who just served you tea,” the director said. “He is a Syrian refugee. He is very polite, hard-working, and cheap. Not only does he prepare tea and coffee, he also fixes anything that is broken around the office, with skill and without complaining. I can’t get anyone else to do that, and all the Syrian refugees are like this!”

For one thing, most of the Syrians appear to be taking jobs not from Jordanians, many of whom often shun lowly pursuits such as handymen, door guards, cleaners, janitors, and messengers, but from the country’s many Egyptian workers. While this is hard on the latter, whose families back home are dependent on the remittances, the advantage to Jordan of having Syrians employed in these occupations is that the money stays in the country. Moreover, in the past year, an apparent reduction in fighting in the south of Syria (certainly compared to the areas in the north bordering Turkey) and stricter Jordanian border controls have meant that the overall refugee population has mostly held steady.

At the same time, Jordan has also been able to take advantage of uncertain, if almost certainly inflated, estimates of its refugee population to persuade foreign donors to be more generous in their support: the authorities, drawing on a recently concluded census, claim they are now hosting 1.3 million Syrians, or about twice as many as the official UN count (though the Jordanian number, as they readily admit, includes pre-2011 arrivals). But these numbers also tell another story: while there clearly is real sympathy for the refugees’ plight, the failure of diplomacy to end the war in Syria, now entering its sixth year, is an escalating concern in this small state whose “native” Transjordanian population feels itself increasingly marginalized numerically, even as it hangs on to the levers of state and bureaucracy.

Still more worrisome to many Jordanian officials is the domestic extremism the Syrian war has been feeding. Jordan is the third-largest contributor of fighters to ISIS after Tunisia and Saudi Arabia, and the Islamic State appears to be gaining in popularity, its violent strain of Salafism starting to invade Jordan’s tribal culture. In the past year alone, a Jordanian army captain from a prominent family defected to ISIS, while the sons of two parliamentarians died after joining extremist groups in Syria. All three of these recruits were Transjordanians.

One place to appraise the situation is Zarqa, a large industrial city north of Amman that produced Abu Musab al-Zarqawi, the infamous leader of al-Qaeda in Iraq and founder of the group that later became ISIS. (Keep in mind that Zarqawi himself was a member of a leading Transjordanian tribe, even if he was also an urban street tough.) According to Amer Sabaileh, a Jordanian researcher who was raised in the same neighborhood as Zarqawi, in many respects things have gotten worse there, despite government attempts to prevent youth from joining jihadist groups. Over sixty percent of the population is under thirty, while the official youth unemployment rate (ages fifteen to twenty-four) stood at 28.8 percent in 2015.

The only thing that appears to have dented ISIS’s appeal among Jordan’s youth is the murder-by-immolation of the downed Jordanian pilot in early 2015—a shocking act of brutality that momentarily unified the kingdom in revulsion against the group. Yet the recent Jordanian recruits suggest that the jihadist networks are continuing to reach into Jordanian society; and if the Jordanian security forces are vulnerable to penetration, one of the most reliable anchors of the country’s stability will be threatened.

Meanwhile, the government has made such little effort to tackle radicalization–it continues to place much stock in the “Amman Message,” a twelve-year-old speech by King Abdullah stressing Islam’s core values of compassion and tolerance–that the subject has become a source of derision among many Jordanians. The state curriculum itself is deeply problematic; its divisive handling of such sensitive issues as Israel/Palestine and its restrictive interpretation of Islam were described to me as “time bombs” by one close observer. It is currently being revised, but few seem to expect dramatic change, in part because no one can control what teachers say in the classroom. If those teachers take their cue from the clerics, there is little hope: instructed to preach against extremism, the latter mouth the words but convey the opposite, at times openly defying the authorities.

This should come as no surprise, as the state seems to do as much to promote religion as it does to counter its extreme forms. For example, the government expends similar amounts on religious affairs and on education (roughly $1 billion per year on each), and the number of religious establishments (mosques and Koran memorization centers) now exceeds the number of nominally secular educational institutions. The new prevalence of religion in daily life is pushing art and culture into a corner, critics contend: no more funding for cinemas or poetry clubs, and fewer libraries. Religious revivalism need not lead to radicalization, but combined with other influences—perceived social injustices, reduced economic prospects, a growing disconnect between leaders and their subjects—it can contribute to that result.

The government is promoting what it refers to as moderate Islam, but what it really is doing is rooting a decidedly religious identity in a country that previously had none (though many Muslims, of course, were devout in their personal lives). Clerics in government-approved mosques are government-appointed, but there is a lot that goes on below the radar. Even if they are forbidden from giving overt support to what is considered terrorism (such as the hotel bombings in Amman in 2005), they are quite free in what they can say: some offer supportive words for Jordanians fighting in Iraq or Syria.

One thing Jordanian clerics cannot criticize—along with their own king—are Jordan’s powerful Gulf allies; public criticism is forbidden under Jordan’s anti-terror legislation and infractions by journalists and commentators trigger lawsuits brought by Jordanians allegedly paid by the aggrieved states. But many Jordanians are fed up with what they regard as the Gulf states’ arrogance, profligacy, and corruption, and I discovered that the most popular topic of conversation in Amman this February was not the Syrian refugees but the anticipated collapse, possibly imminent, of the Saudi monarchy. (Haven’t you heard?) The tenor of the discourse suggests that few Jordanians would shed a tear if such a doomsday outcome were to come to pass.

The Saudi Kingdom has gone through considerable upheaval since King Salman came to the throne in early 2015, but the prospect of the House of Saud’s fall is not something Jordanian elites should cherish. The havoc it would create in Jordan and the region would be enormous. If the flood of Syrian refugees is causing serious duress, the true threat to Jordan’s stability emanates from a Middle East that is coming increasingly unscrewed. Many Jordanians work in the Gulf, sending their earnings home, but business is facing difficult times. The decline in the price of oil, and therefore of fuel products, has helped Jordan’s energy needs (it relies on imports), but prices of almost all other commodities are rising. Apart from Western aid and Saudi subsidies, which are in question, Jordan’s only significant source of foreign-exchange earnings is tourism. But as one aid official ruefully noted, political “tourism” to the Za’atari refugee camp on the Syrian border (in the form of official delegations) is exceeding pleasure tourism to Aqaba and the other usual destinations these days. Moreover, foreign investors have increasingly been reluctant to invest in Jordan, doubting the future of its economy in a turbulent neighborhood.

Jordanian officials themselves have begun to worry about the political effects of a large Syrian population that seems unlikely to return home anytime soon. Jordan, unlike Syria and Lebanon, granted citizenship to Palestinian refugees during an earlier era, but it has kept them largely out of senior positions in state institutions, especially the army and security services, ever since. As for their Iraqi and Syrian successors, obtaining Jordanian residency, let alone a Jordanian passport, is not even a realistic prospect.

Instead, in referring to the refugees, government officials have started to speak darkly of the Syrian “component” (mukawwan), a label amplified by the media that alludes to developments in post-Saddam Iraq, where the distribution of power among ethnic and confessional communities—termed “components” or “constituent parts”—came to be understood as a (nefarious) political plan for partition. If Jordan begins to turn into a country of individual components with unequal rights, now including another mass of seemingly permanent refugees, rather than a population organized under a single identity, it could threaten national stability. It is just a little ironic that, in a region with a deep historic grievance about how Western powers manipulated post-Ottoman boundaries to create the modern Arab states to serve their own interests, the thing Arab elites seem to fear most is the breakdown of that very order.

Government officials suggest that they are watching developments in the region with concern, but can do very little to get ahead of them; they increasingly seem to be lacking a unifying vision for the country. King Abdullah has been adept at soliciting foreign aid but he seems to have few other plans for Jordan’s development and his popularity appears to be more by default: given the state of the neighborhood, people fear worse, even if they complain of a rising cost of living, restrictions on freedoms, and visible corruption.

Meanwhile the current Jordanian business model—playing up Jordan’s reputation for stability while asking for foreign assistance to keep threats to it at bay—is coming under stress. For now, the refugees are a useful fundraising tool, as the king discovered at the recent donors’ conference in London. On March 27, the World Bank announced it was offering an unusual, interest-free $100 million loan to Jordan to provide job opportunities to refugees. And Jordan has little to fear about donor states imposing new requirements on the country to receive aid, since the kingdom has already fulfilled the West’s principal demands: an unwavering commitment to its peace treaty with Israel, a steady counter-terrorism partnership (led by a security apparatus seen as exceptionally professional and efficient), and enduring stability in a region that is anything but.

But it is impossible to predict what turn the Syrian war will take next: Will peace efforts falter and fighting escalate once more, sending a fresh swell of refugees washing across the border? Will a resurgent Syrian regime seek to exact revenge on Jordan for its help—much of it directed undercover by the CIA and Saudi Arabia—of the rebels in the south? Will ISIS forces be driven from their strongholds and look for a safe haven in refugee camps in Jordan and towns such as Zarqa, where discontent is rife? Or will some Jordanians’ predictions—or wishful thinking—come true and Saudi Arabia implode from its own internal contradictions and foreign misadventures, setting off a dramatic domino effect from which Jordan almost certainly would not remain immune? Indeed, a Western aid administrator wondered openly, could Jordan be next?