It took donald trump less than 48 hours to lay the foundations of a radical shift in us middle east policy and ingratiate himself with some of the regions most powerful leaders. on visits to saudi arabia and israel his first overseas as us president in may 2017 he set the tone for the transactional and personality-based relationship that has characterised his dealings with the regions strongmen.

He made it clear that iran was in his crosshairs, arms sales would be a priority and human rights concerns would be consigned to a proverbial dustbin telling a summit of muslim leaders in riyadh: we are not here to lecture. it was welcomed by the uss traditional middle east allies, saudi arabia, the united arab emirates, egypt and israel. all were desperate to see new us policies after years of rising anger with the administration of barack obama not least for signing the 2015 nuclear deal with tehran.

Mr trump could yet win re-election: few analysts in washington have written him off. but with the president trailing badly in the polls, the regions leaders are being forced to contemplate the prospect of democrat nominee joe biden entering the white house, upending the presidents policies and setting a new course for relations with the gulf.

For those who invested heavily in their personal relationship with mr trump, notably saudi crown prince mohammed bin salman and de facto uae leader sheikh mohammed bin zayed, a biden victory in november would usher in a fresh period of uncertainty and unease. some even ask whether a new president could cold shoulder states as a punishment because of their closeness to the trump administration.

President donald trump (l) and benjamin netanyahu after delivering a speech during a visit to the israel museum in 2017 in jerusalem

In riyadh, the worry is that obama-era officials return to power and relations with the kingdom become politicised with the real possibility of a hard reaction to saudi, purely to be anti-trump, a saudi official says.

The most obvious policy shift would be a biden administration rejoining the iran nuclear deal that mr trump unilaterally withdrew from in 2018 to the applause and relief of saudi arabia, the uae and israel. but the whole relationship forged since mr trumps riyadh trip could be upended more so if congress also falls under democrat control.

Mr biden, mr obamas vice-president, would be likely to revisit and potentially reformulate the entire approach to the gulf, a former senior obama administration official says.

Joe biden, then us vice-president, visits the sheikh zayed grand mosque in abu dhabi in 2016

After enjoying what critics view as a free ride by mr trump, the arab states risk facing far greater scrutiny on human rights and their foreign interventions, while having a less sympathetic ear for their hawkish stances on iran.

Every country whose leaders have close relationships with the current president are going to find themselves out in the cold if biden takes office. i think thats going to be egypt, maybe turkey, definitely saudi arabia and the uae, says kirsten fontenrose, former senior director for gulf affairs at the national security council in the trump administration. a biden administration will seek to limit their purchases of weapons and we would probably see fewer official visits.

The task of courting a biden administration would be much harder for prince mohammed, saudi arabias de facto leader and known colloquially as mbs. mbs will be treated as a pariah as biden has called him, says bruce riedel, a former cia officer, alluding to comments made by the presidential hopeful during a debate last year when he threatened to make saudi arabia the pariah they are.

Abu dhabi and riyadh have been trumps staunchest arab partners in his efforts to counter tehran and they have forged close ties with jared kushner, mr trumps son-in-law and middle east adviser. but both have drawn criticism from us lawmakers for their roles in the war in yemen and the regional embargo they spearheaded against qatar in june 2017. prince mohammed has in particular been the target of bipartisan opprobrium since saudi agents murdered jamal khashoggi two years ago.

Abu dhabi has sought to subtly distance itself from saudi arabia, analysts say, acknowledging the damage its links to prince mohammed, have done to its carefully crafted reputation.

The uae withdrew the bulk of its troops from yemen last year. but it remains involved in libyas civil war, where it backs renegade general khalifa haftar alongside russia, whose presence in the southern mediterranean has sparked growing anxiety in the us military. it was also the first gulf state to reopen its embassy in damascus, delivering a boost to syrian president bashar al-assad.

A child is rescued from the site of a saudi-led air strike in sanaa, yemen, in 2017

Yet sheikh mohammed, who has not visited the us for three years, has hedged against the potential for change in the white house by agreeing in august to normalise relations with israel. the move, last week followed by bahrain, was seen by many as an attempt to curry favour across the political divide in the us.

And mr biden duly praised the uae for a brave and badly needed act of statesmanship.

Its such a smart deal because youve got evangelical christians in the trump space and liberal jewish communities in bidens camp both saying this is a great thing, says ms fontenrose. but, she adds, if theres a biden administration they [the uae] will be kept at arms length from the white house: one, because they are perceived as propping up mbs; and, two, just because of their relationship with trump.

Yet in abu dhabi there is confidence that if mr trump loses, the influential emirate will retain its strong ties to washington as its military and intelligence co-operation with the us has deepened over the past two decades.

Biden will definitely be bad for some, but he will be absolutely on board with the uae, says abdulkhaleq abdulla, a prominent emirati commentator. the uae is 10ft taller than it was before the israel deal.

Anwar gargash, uae minister of state for foreign affairs, told a forum that the israel agreement would signify a new gear in the gulf states us relations. our strategic relationship with the us, which is our most important relationship, will develop further, he said.

But if there is a confidence among emirati officials that the uae would successfully adjust to a biden administration, there is concern among saudi officials.

More than any other western leader, mr trump backed prince mohammed after the khashoggi murder triggered the kingdoms worst diplomatic crisis in years. the president reportedly told veteran journalist bob woodward he saved prince mohammeds ass and got congress to leave him alone.

Trump and saudi arabias crown prince mohammed bin salman during the family photo at the g20 osaka summit last year

Because we have got along well with trump on middle east politics although there have been disagreements and american politics is so polarised we are concerned that we become a ball being played between two groups, the saudi official says.

He adds that the worlds top oil exporter has endured previous periods of fraught relations with the us that have been overcome, from the 1973 oil embargo to the second palestinian intifada in the early 2000s when the late king abdullah flew to washington and told former president george w bush that if your interests go one way and ours go the other, so be it.

The us is far less reliant on saudi oil imports than it was in the past, and mr biden has promised to overhaul the us energy system and put climate change at the heart of his agenda. however, the kingdom is considered an important intelligence partner and its stability is deemed vital to the region.

We would hope any us administration sees the importance of saudi arabia, the official says, and its not just something that should be tossed aside.

Trump, first lady melania trump, king salman bin abdulaziz al-saud of saudi arabia (c) and egyptian president abdel fattah al-sisi (l) opening the world center for countering extremist thought in riyadh, saudi arabia, in 2017

The principal concern among the two gulf monarchies, their arab allies and israel and mr bidens prickliest middle east decision would be how he handles iran.

Their main complaint with the 2015 deal was that it empowered iran just as tehrans regional influence was rising. they also criticised the accord for focusing on the wests fears about the republic acquiring a nuclear weapon, while failing to address the regions worries about tehrans missile programme and support for militias. and they felt excluded from the whole process.

Mr biden has said washington would rejoin the deal as long as tehran came back into strict compliance. iran increased its nuclear activity in response to mr trumps crippling sanctions, but insists it is committed to the accord, which is still supported by european governments, russia and china.

Chart showing that us arms exports to the middle east surged under obama. volume of exports of major conventional weapons, common unit (billions)

We urgently need to change course, mr biden wrote in a recent opinion piece for cnn, calling mr trumps iran policy a dangerous failure.

There is a smart way to be tough on iran, and there is trumps way, he wrote, adding he would offer tehran a credible path back to diplomacy.

His advisers say he has yet to decide how to tackle regional concerns, but is weighing either a renegotiation of the deal or agreeing a parallel track to address the concerns of gulf states, which could appease some of the regions hawks.

The uae in particular has sought to de-escalate with iran after tankers were sabotaged in the gulf last year and tehran warned emiratis that their nation would be targeted if washington attacked the republic. emirati officials have suggested a political track should accompany the sanctions.

Saudi arabia has also quietly sought to defuse the situation with iran after attacks blamed on tehran in september 2019 temporarily knocked out half its oil output. but there would be concerns that a softer line on iran would once more empower the republic.

This is the worst possible time for a lot of money to be injected into someone who wants to stir things up, the saudi official says.

Israel, meanwhile, continues to strike iranian targets in syria.

Few are as critical of the iran nuclear deal as benjamin netanyahu, the rightwing israeli prime minister who has enjoyed a particularly close relationship with mr trump. in his first term, the us president has sidelined the palestinians and taken several contentious steps in support of israel, including moving the american embassy to jerusalem. mr biden has made it clear that he would leave the embassy in jerusalem.

But mr netanyahu is another who could expect strained ties with a biden administration after his hostility towards mr obama ruptured his relationship with democrats.

The reactor building at the russian-built bushehr nuclear power plant in southern iran, 1,200km south of tehran

There has been long term and deep damage to democratic support of israel. you cannot fix that quickly. netanyahu can play nice with biden, but for most democrats he is in the enemy camp, says natan sachs at the brookings institution. the important question is how much that would extend to israel, after netanyahu is gone, and what would it mean in terms of us policy, because israel remains very popular in america.

Biden advisers caution that he would likely be slower to act on the middle east than some expect. they say the region would be a low priority for a new administration focused on coronavirus and foreign policy issues in asia, europe and the americas.

His advisers add there would be no rush to secure an agreement with tehran in what is likely be a complex process.

Iran, which holds its own presidential election in june with a hardliner expected to win, has insisted it would not hold talks as long as us sanctions prevent it exporting oil, the moribund economys lifeline. ayatollah ali khamenei, the countrys supreme leader, told officials in august it would be a strategic mistake to tie the economy to the election in a certain country.

But he kept the possibility of negotiations open. they [the us] might make a good decision one day or make a bad decision, he said. if its a good decision, we will use it.

Mr biden would, however, struggle to negotiate a grand bargain to include missiles and militias, analysts say.

The us should be modest about our ability to transform the region, says colin kahl, who was mr bidens national security adviser when he was vice-president. in that role mr biden opposed us intervention in libya in 2011 and was against the troop surge in afghanistan, but failed to win that argument.

He has surrounded himself with many former obama officials, including mr bidens own former national security advisers mr kahl, tony blinken and jake sullivan.

Yet even if there is anxiety in some arab capitals about the potential for a biden victory, mr kahl and other advisers argue a democratic administration would offer something they have been missing: policy consistency set against the unpredictability of another trump term.

Both saudi arabia and especially the uae are sufficiently pragmatic to understand that they [would] have to recalibrate their policies, mr kahl says. if they want to co-operate with us, then they can do so, [but] its got to be on terms that are agreeable to us.

If not, they run the risk of losing bipartisan support.

While the two gulf states cheered mr trumps tough stance towards tehran, there was some unease about his apparent unwillingness to back his bellicose rhetoric with a muscular response after iranian forces shot down an us drone and the assault on saudi arabias oil infrastructure. he also upset arab allies by tacitly greenlighting a turkish offensive against us-backed kurds in northern syria.

Trump meets with turkeys president tayyip erdogan in the oval office of the white house last year

Gulf states growing ties with china have also meant they have been caught up in the tensions between the trump administration and beijing. but the legacy of the obama administration and the nuclear deal lingers in the background, still rankling some arab officials.

The concern the arabs have with a democratic administration is that it would desperately want to prove what obama did [on iran] was right, but it was wrong, says a senior arab diplomat. if they say, let us go back to a table and we bring our allies, or at least take their concerns into account, thats a different story. but it didnt happen. thats why trump was so welcome in the region thats how it all started.