The United States has usually looked the other way or issued carefully calibrated warnings in human rights reports as the Saudi royal family cracked down on dissent and free speech and allowed its elite to fund Islamic extremists. In return, Saudi Arabia became America's most dependable filling station, a regular supplier of intelligence, and a valuable counterweight to Iran.
For years it was oil that provided the glue for a relationship between two nations that share few common values.
Today, with U.S. oil production surging and the Saudi leadership fractured, the mutual dependency that goes back to the early 1930s, with the first U.S. investment in the kingdom's oil fields, no longer binds the nations as it once did.
But the political upheaval in the Middle East, and the U.S. perception that the Saudis are critical to stability in the region, continues to hold together an increasingly fractious marriage. So when Saudi Arabia executed 47 people, including Sheikh Nimr al-Nimr, the dissident cleric, on Saturday, beheading many of them in a style that most Americans associate with the Islamic State rather than a close U.S. partner, the administration's efforts to explain the relationship became more strained than ever.
In fact, the executions were the culmination of a series of events in the past few years that have led to clashes between the two nations.
"We haven't been on the same page with the Saudis for a long time," said Martin S. Indyk, the executive vice president of the Brookings Institution and a former top aide to Secretary of State John Kerry. "And it starts with Mubarak."
In 2011, Saudi leaders berated President Barack Obama and his aides for failing to support President Hosni Mubarak of Egypt during the Arab Spring, fearing Obama might do the same thing if the uprisings spread to the kingdom.
The nuclear deal with Iran only fueled the Saudi sense that the United States was rethinking the fundamental relationship - and Saudi officials, on visits to Washington, openly questioned whether they could rely on their U.S. ally. It was King Abdullah who was quoted in a 2008 State Department cable, released two years later by WikiLeaks, exhorting the United States to "cut off the head of the snake" - Iran - by launching military strikes. He died before last summer's deal, but Saudi leaders, who still see Iran's hand behind every destabilizing act in the Middle East, argued that the administration was naïve to think that Iran would abide by any negotiated accord.
So ever since that accord was reached in July, the Obama administration has been offering reassurance. Obama invited the Saudis to join a meeting at Camp David to reassure Arab allies that the United States was not abandoning them - and would sell them larger weapons packages than ever before. But the administration has also been sharply critical of the Saudi intervention in Yemen, seeing it as huge distraction from the bigger battle against the Islamic State.
To hear the Americans tell it, the new Saudi leadership struggling for influence under King Salman is headstrong, "more interested in action than deliberation," in Indyk's words.
When Kerry warned the Saudis against executing al-Nimr, a Saudi-born Shiite cleric who directly challenged the royal family, he was ignored. "This is a concern that we raised with the Saudis in advance," Josh Earnest, the White House press secretary, acknowledged on Monday. He said the execution has "precipitated the kinds of consequences that we were concerned about."
But that was about as strongly as the administration was willing to criticize the Saudis. Pressed to condemn al-Nimr's execution, officials urged calm on all sides. The State Department spokesman, John Kirby, urged the entire region to move on to the business of confronting the Islamic State and dealing with the Syria crisis.
"If you are asking whether we are trying to become a mediator in all this, the answer is no," Kirby told reporters. "Real, long-term solutions aren't going to be mandated by Washington, D.C."
Privately, several U.S. officials expressed anger at the Saudis for picking this moment to conduct the executions.
They noted that Obama and Kerry have been in regular contact with members of the Saudi leadership. Obama called to urge the Saudis to join the Syrian peace process talks - across the table from the Iranians. Kerry traveled to Riyadh, the Saudi capital, and later asked the Saudis to organize the Syrian rebels into a single group to negotiate a cease-fire with President Bashar Assad.
But the Saudis were reluctant partners, telling their Western counterparts that they would go along, but predicting that Kerry's effort would collapse because Iran would never agree to any process that led to Assad's removal. Meanwhile, the Saudis' early participation in airstrikes against the Islamic State petered out as they moved military assets to their campaign against the Iranian-backed Houthi rebels in Yemen.
Others who deal with the Saudis say there is a degree of stress on the leadership in Riyadh they have rarely seen before.
"The kingdom faces a potentially perfect storm of low oil income, open-ended war in Yemen, terrorist threats from multiple directions and an intensifying regional rivalry with its nemesis, Iran," Bruce Riedel, a former senior CIA officer with long experience in the region, wrote on Monday.
Patrick Clawson, of the Washington Institute for Near East Policy, saw a desire to send a pointed message to Washington. The Saudis were saying, Clawson wrote, that "if the United States will not stand up to Iran, Riyadh will do so on its own."
The Saudi concern that the Obama administration is about to embrace Iran is almost certainly overblown. Since the nuclear agreement, the Iranians have tested ballistic missiles twice, and the administration - after some delays - appears to be readying sanctions in return. And last week, Iranian naval ships fired rockets within 1,500 yards of a U.S. carrier group. The supreme leader of Iran, Ayatollah Ali Khamenei, has ruled out cooperation with the United States - although the Iranians have shown up at the Syria talks.
On occasion, U.S. officials muse about whether the United States and Iran might, one day, constitute more natural allies than the United States and Saudi Arabia. But that seems far off.
"It's not as if you have an Iranian alternative," a senior Gulf Arab official said recently. "And if you have no alternative, your best choice is to stop complaining about the Saudis."