Surrounded by grey rocky mountains and the blue Sea of Oman, the city of Muscat feels like an oasis of calm in a region afflicted by a deepening sectarian conflict.

Omanis slip into the nearest mosque to pray, not caring whether it’s run by Ibadis, Shiites or Sunnis. Civil service and military jobs are open for all. And any scepticism expressed about their coexistence is considered offensive.

Being the Switzerland of the Gulf served the country well over the decades, helping the sultanate survive, thrive and make it a key conduit for trade and diplomacy in the turbulent Middle East. The problem is that it looks less viable as Oman succumbs to the all-too-familiar financial strains of countries reliant on petrodollars and the geopolitics of its location.

The key to Oman’s independence has been its ability to fend for itself financially. That might have to change if the government can’t fix the economy soon.

If Oman is forced to seek assistance from the more powerful and wealthier Saudi Arabia and United Arab Emirates, there may be political strings attached that drag the country into their orbit. It risks upsetting the balance further in a region already upended by the proxy conflict with Iran.

“Economic instability is possibly the single biggest threat to Oman,” said Cinzia Bianco, Middle East and Gulf analyst for Gulf State Analytics in London. “Because they were able to cope economically, they were also relatively safe from peer pressure from other regional powers.”

Oman shares land borders with Saudi Arabia, the UAE, and war-ravaged Yemen and a sea border with Iran. Independence and neutrality have been a cornerstone of Omani policy since Sultan Qaboos took power in 1970. When Arabs boycotted Egypt for its 1978 peace deal with Israel, Oman maintained the ties. It refused to take sides in the eight-year war between Iran and Iraq in the 1980s.

More recently, Oman has kept its embassy in Syria open even as other Gulf states cut diplomatic relations with Damascus. It refused to join the Saudi-led war on Yemen and has kept its ports open to Qatar, which is using them to get around a boycott by Saudi Arabia, the UAE, Bahrain and Egypt.

“When I tell people in Europe that I am Omani, they instantly know I am not a trouble-maker,” Muscat businessman Ammar Alsidairi, 26, said during an intermission at a concert by the Russian National Orchestra at the Royal Opera House in Muscat.

But like the rest of the Gulf, Oman’s finances have been battered after crude oil prices started to decline in 2014.

The slump in revenue hit the rest of the economy. Gross domestic product excluding oil production grew 2 percent last year down from an average 7 percent between 2000 and 2014, according to the International Monetary Fund. The economy as a whole shrank in 2017 for the first time since 2011.

The country has had to borrow heavily to finance spending and cover the sizable outflows from remittances by foreign workers. The result is that it has the Gulf’s most fragile currency peg.

On a visit to Oman last month, it was clear that the economy was very much on everybody’s mind. Talk was of diversification away from oil, the need for tourism and the drive to create employment for locals.

State-run newspapers highlighted the government’s ability to find jobs for over 20,000 Omanis in five months. “Omanisation” is at full steam, though Omani businessmen, like those in Saudi Arabia and other Gulf countries where a similar effort is underway, are unhappy because foreign workers are cheaper. Efforts to diversify away from oil and gas, which make up about 70 percent of government revenue, have taken on more urgency.