Saudi Arabia's de facto ruler can expect warm personal ties with the White House if Donald Trump is re-elected, but he also knows the risks that come with the unpredictable Republican candidate.
With the Middle East in turmoil and a potential "mega-deal" to recognise Israel hanging in the balance, analysts say Crown Prince Mohammed bin Salman is clear-eyed about how Trump could undermine his agenda.
After relations with President Joe Biden recovered from a rocky start, the 39-year-old prince knows he can work with Vice President Kamala Harris should she win on November 5.
"I think, broadly, the Saudis are keener for a Trump victory," said Dina Esfandiary of the International Crisis Group.
"On the surface, he will be more supportive of them and less critical of them. But they worry what are some of the out-of-left-field things he might do?"
After taking office in 2017, Trump's first overseas visit was to the Saudi capital Riyadh, where he basked in an elaborate welcome involving a sword dance and a fly-past of air force jets.
The honeymoon period later cooled, with Prince Mohammed faulting Trump for failing to respond more aggressively after a 2019 attack widely blamed on Iran halved the Gulf kingdom's crude output.
Biden has taken the opposite trajectory, initially vowing to make Saudi Arabia "a pariah" before diving into talks to deepen ties in exchange for Riyadh's recognition of Israel.
The Gaza war has put the deal on ice, but one result of Biden's about-face is the Saudis would now be "equally comfortable" with either Trump or Vice President Kamala Harris in office, said Ali Shihabi, a Saudi analyst close to the government.
"They have a good relationship with Trump and a high level of access to him, while at the same time they now have an excellent relationship with the Biden-Harris administration and see no reason why that would change with Kamala," Shihabi said.
"It's a rare moment when they really are OK with either party winning."
Biden's change of heart
Russia's invasion of Ukraine in February 2022 sent energy prices soaring, reinforcing Saudi Arabia's clout as a major Middle East power and the world's biggest crude oil exporter.
In July of that year Biden flew to Saudi Arabia for a fist-bump and meeting with Prince Mohammed, a controversial climbdown after lambasting the kingdom for the 2018 killing of Saudi journalist Jamal Khashoggi.
Soon the two sides were hashing out the contours of an agreement in which Saudi Arabia would recognise Israel in exchange for a defence pact with the United States and help on a civilian nuclear programme.
Stay informed. Subscribe to our newsletter
That drove home the notion that both Democrats and Republicans are prepared to work closely with Saudi Arabia, said Aziz Alghashian, senior fellow at Observer Research Foundation Middle East.
"I think Biden is the epitome of this because he came in with such strong anti-Saudi rhetoric," Alghashian said.
Both US candidates would likely be keen to press talks on the deal, though its fate would hinge on gaining the approval of lawmakers.
"Whether it's Trump or Harris (in the White House) matters less," Esfandiary said.
- The trouble with Trump -
Under Biden, Saudi Arabia has altered its policy on Iran in a way that may make it less keen on a second Trump term.
In March 2023, the kingdom reached a Chinese-brokered entente with its former foe after seven years of severed ties and has held multiple engagements with Tehran since war broke out last year between Israel and Iran-backed Hamas in Gaza.
Trump is a known hawk on Iran, who unilaterally withdrew from a landmark 2015 nuclear deal and ordered the 2020 assassination of Revolutionary Guards commander Qassem Soleimani.
"I anticipate that Trump if he becomes president, will complicate things when it comes to Iran," Alghashian said.
Still, Saudi Arabia and the Trump team have strengthened their bond ahead of the election.
Trump-era heavyweights attend glitzy investment conferences in Riyadh, and his privately owned conglomerate, the Trump Organization, is active in the Gulf.
In July it announced a deal to partner with a Saudi developer on a high-rise tower in the coastal city of Jeddah.
Jared Kushner, Trump's son-in-law, has defended receiving a Saudi investment in his private equity firm that reports put at $2 billion.
Such deals mean a second Trump term "would certainly raise ethical questions", said Kristin Diwan of the Arab Gulf States Institute in Washington.
"Trump's brand somewhat mirrors the family politics and overlapping public-private interests of the Gulf monarchs themselves," she added.