PERCHED on a hill beneath a ruined Crusader castle, Karak feels a world away from Amman, Jordan’s crowded and expensive capital. The sleepy city is surrounded by lush farms and sits astride the tourist trail, both of which should provide jobs. Yet it has been buffeted by the problems that afflict the rest of the kingdom. Mayhem in Syria and Iraq has hurt farm exports. A terrorist attack by Islamic State (IS) in 2016 sent tourists fleeing. Earlier this year protests broke out in Karak and other cities over the perpetually troubled state of Jordan’s economy.

The spark was a package of price rises announced in January as part of an IMF-backed reform programme. Bread prices nearly doubled and fuel taxes climbed from 24% to 30%. Such measures are necessary: Jordan spends $1.2bn a year (9% of its budget) to subsidise food, fuel and water. The debt-to-GDP ratio hit 95% last year, in part because just 3% of Jordanians pay income tax. But austerity is compounding their pain. The unemployment rate is 18%.

At the crossroads between the Levant and the Gulf, Jordan would seem to be in an enviable place. But geography has been a curse rather than a blessing. “We’re an economy under siege,” says Jafar Hassan, the deputy prime minister for economic affairs. In 2010 Syria and Iraq took nearly 20% of Jordan’s exports. But after IS seized a swathe of Iraq in 2014, Jordan had to shut its border. Exports fell by 68% in the following two years (see chart). Those to Syria dropped from 169m dinars ($239m) in 2010, before the civil war there, to just 31m dinars last year.

The one bright spot was Saudi Arabia, an oil-rich neighbour that imports almost everything. In 2015, for the first time, Jordan’s exports to the kingdom exceeded $1bn. Then oil prices crashed and the Saudi economy tipped into recession. Last year exports were down 27% from their peak in 2015. All this feeds what one minister calls “an atmosphere of despair”.

In the past Jordan’s government dealt with hardship by spending more. As the Arab Spring swept the region in 2011, the king increased subsidies and raised the pay of public workers. One in three Jordanians works for the state (though “work” is often too generous a term). Many start these jobs at 18 and keep them for life. Efforts to trim the public payroll, or even impose performance reviews, meet fierce opposition. “You have to pay them for 60 years,” says Oraib al-Rantawi, an analyst.

Foreign aid has bankrolled bad policy. Though it has few resources, Jordan extracts “strategic rents” from the West and Gulf states, which consider its stability essential to the region. In 2011 the six-member Gulf Co-operation Council (GCC) handed over $5bn to help the king weather the Arab Spring. In 2016 Jordan collected $290 per person in development aid, more than twice as much as impoverished Haiti or war-torn Afghanistan. In February America pledged $6.4bn in aid over the next five years, a 28% increase compared with their previous agreement.

Much of this money has been soaked up by refugees. Jordan gives shelter to 656,000 Syrians who have fled the war. Mr Hassan estimates that the government has spent $10bn to cope with the influx. Meanwhile, aid from Gulf states, which face their own economic challenges, has dried up. King Abdullah annoyed the Saudis when he sent only a small contingent to join their fight against Houthi rebels in Yemen. And whereas Jordan used to be an interlocutor with Israel, Gulf states now talk directly (if discreetly) to their former foe. All this has eroded Jordan’s strategic value.

A bigger shock may loom. With oil prices still low, though rising, most GCC members are keen to replace migrant workers with their own citizens (see article). That could affect the 800,000 Jordanians who work in the Gulf. Last year they sent home $2.4bn. Even a modest reduction would be a serious blow.

Jordan is also hoping to free up jobs at home with a $140m scheme to reduce the number of migrant workers by up to 25% over the next five years. But many Jordanians feel menial work is beneath them. An MP complained about the influx of Syrian labourers over coffee in a café where all the waiters had Egyptian accents. More than 600,000 Egyptians live in Jordan, alongside thousands of other foreigners who send $1.5bn (or 4% of GDP) home each year.

It is now more common to see students working as baristas, but Starbucks alone will not dent the unemployment rate. Investment in agriculture and textiles may provide work for both Jordanians and Syrian refugees. The kingdom could also invest more in tourism, which employs only 50,000 Jordanians but could do far better. Jordan boasts stunning ruins, sweeping deserts and the Dead Sea.

The government seems to recognise the scale of the problem. The parliament plans to pass new bankruptcy and tax laws soon. There is talk of a free-trade zone with Kenya in the Red Sea port of Aqaba, part of a push to tap new markets in Africa. A five-year “growth plan” aims to invest billions in new infrastructure, much of it through public-private partnerships (PPPs).

Jordanians have heard much of this before, though. One PPP is building a “new downtown” in Abdali, a run-down district of Amman. Conceived more than a decade ago, the developers hope it will become a services hub. It could turn out to be a miniature Dubai—or an unaffordable prestige project. “There’s a lot of scepticism about all this,” admits Mr Hassan. “Jordan today doesn’t lack plans, so much as the ability to implement them.”