The murder of Saudi dissident journalist Jamal Khashoggi has come at time when the Trump administration is at its most dependent on Riyadh for the success of both its foreign and domestic policies.

Donald Trump has spoken repeatedly about US arms sales to Saudi Arabia, hugely overstating the actual figures. The president also benefits personally by Saudi royals and officials spending freely at his luxury hotel.

But he is reliant on Riyadh for more urgent and consequential reasons.

In three weeks' time, sweeping US sanctions go into effect on Iran, as the administration seeks to cut off the country's oil exports. Since walking out of an international nuclear deal with Iran in May, Trump has made crippling the Iranian economy a foreign policy priority, though his officials deny the aim is regime change.

Without a compensating increase in oil supply from other oil suppliers, Saudi Arabia foremost, the sanctions that go into effect on 4 November will produce a spike in oil prices just ahead of the finely balanced midterm elections.

"If they are going to squeeze Iran with new sanctions next month they need the Saudis to fill the gap on world markets," said Bruce Riedel, a former senior CIA official who is now director of the Intelligence Project at the Brookings Institution in Washington.

"If the Saudis are slow or hesitant about filling the gap, oil prices will go up and the the president will be in trouble economically. Nothing makes Americans more riled than going to the pump with prices going up especially as we approach the holiday season."

Oil prices have been pushed up considerably in recent weeks as the Iran sanctions deadline nears. Iranian production has dropped by 376,000 (about 10 %) in the past six months. The country supplies about 3% of global daily consumption, but at a time of high and rising demand, the withdrawal of Iranian oil from the market could have a big effect. Some analysts are predicting that the crude oil price could rise from just under $80 a barrel to $100 a barrel in the next few months.

"The Saudi spare capacity ... is absolutely vital to fill any deficit of oil that may occur as a result of the new US sections on Iran," said Ariel Cohen, senior fellow at the Atlantic Council and a political risk and energy analyst.

"According to the most conservative calculations the kingdom can add up to 1.5m barrels a day to the market, whereas Iran is currently exporting about 1.6m. Any additional deficit can be covered by Russia, Azerbaijan, Kazakhstan and the US massive shale production capacity. However, Saudi Arabia is important in the US strategic calculus beyond its status as the largest oil exporter in the world."

Saudi support is critical to other planks of Trump's Middle East policy. Saudi Arabia is the main financier of a Syrian stabilisation fund. Trump has been persuaded by allies and his own officials to keep US troops in Syria to combat Isis and provide a bulwark against Iranian influence. But he insisted other nations pay more of the bill. Riyadh pledged $100m in August, but the money only landed in US accounts on Tuesday - the day the secretary of state, Mike Pompeo, arrived in Riyadh to talk to the Saudi king and crown prince about Khashoggi's fate.

The state department confirmed the timing of the deposit, first reported by the New York Times, but argued it had nothing to do with Khashoggi's disappearance. A state department official said the special envoy for combatting Isis, Brett McGurk, had been in Riyadh on 12 October discussing how the money should be spent in Syria.

"The process from memorandum of understanding to transfer of $100m has multiple steps all of which we clicked through over the past two months," the official said.

Hassan Hassan, a senior research fellow at the programme on extremism at George Washington University and an expert on Syria, said:

"The whole administration's policy hinges on how much Saudi is willing to contribute in eastern Syria. All these elements of administration policy are interconnected and Saudi Arabia is the centerpiece."

Throughout the Trump presidency so far it has been hard to determine where his interpretation of the US national interest ends and where his own personal interests begin. The president's claim following the death of Jamal Khashoggi that he had "no financial interests in Saudi Arabia" obscured deals worth tens of millions of dollars that he has done with wealthy Saudis in business relationships dating back decades.

Three years ago, he was far keener to boast of this record.

"Saudi Arabia - I get along great with all of them," he told supporters at a campaign rally in Mobile, Alabama. "They buy apartments from me, they spend 40 million, 50 million. Am I supposed to dislike them? I like them very much."

In June 2001, the Saudi government paid $11.7m for the entire 45th floor of Trump World Tower near the United Nations, according to city records obtained by the Guardian.

The deal comprised five apartments totaling more than 10,000 square feet, apparently for use by the Saudi mission to the UN. No sale price was listed in the public filings for the deal, and a lower price of $4.5m has previously been reported elsewhere.

Citizens for Responsibility and Ethics in Washington, a pro-transparency group, estimates that the Saudi government continues to pay the Trump Organization almost $90,000 a year in monthly common charges for the apartments.

More recently, Saudi cash has flowed through Trump's hotels. A "last-minute visit" to Trump International in New York by Crown Prince Mohammed bin Salman and his entourage early this year helped reverse a two-year decline in the hotel's revenues, the Washington Post revealed.

Meanwhile a lobbyist working for Saudi Arabia in Washington billed the kingdom for $270,000 paid to Trump's hotel in the capital for accommodation, food and parking between October 2016 and March 2017, a filing to US authorities reveals.

During the early 1990s, a struggling Trump was bailed out by the Saudi prince Alwaleed bin Talal. In 1995 the prince bought a controlling stake in Trump's New York's Plaza hotel, paying down debts for which creditors were breathing down Trump's neck. "This may seem generous to Mr Trump," the New York Times noted, when the deal was announced.

By then Trump had spent at least a decade mixing with Saudi royals. In February 1985, he was reportedly among a handful of celebrity guests invited by President Ronald Reagan to a reception at the White House for the visit of King Fahd bin Abdul Aziz. After the king gave remarks, non-alcoholic drinks were served in place of the usual champagne toast - perfect for the teetotal Trump and Saudis.

Comment: With US elections a few weeks away, the timing of the Khashoggi murder is not only deeply disturbing, it is inconvenient. The Saudis have a part to play in Trump's Iranian oil sanction plan. Will they comply and keep US voters in Trump's court?

The most successful tyranny is not the one that uses force to assure uniformity but the one that removes the awareness of other possibilities, that makes it seem inconceivable that other ways are viable, that removes the sense that there is an outside.