The case of British student Matthew Hedges, jailed for life in the United Arab Emirates on charges of espionage, has sparked another "teachable moment" in the relationship between Western governments and their wealthy Arabian friends.
In shorthand, it's the "security relationship" against human rights; money against due process.
There are echoes in the Hedges case of the clash in priorities that has dogged the West's response to the murder of Jamal Khashoggi in Istanbul, and of the spat between Saudi Arabia and Canada over the jailing of female activists.
The 31-year-old Ph.D. student was arrested in May as he prepared to fly home. He had been researching civil-military relations in the UAE, according to his supervisor.
The response from the UK was swift. Foreign Secretary Jeremy Hunt said he was shocked by the "unacceptable" verdict, which was "not what we expect from a friend and trusted partner."
The UK's quiet (and, to Hedges' family, inadequate) diplomacy had failed. Hedges' wife, Daniela Tejada, told CNN in her first TV interview on Thursday that she wished British officials had listened sooner but had been reassured by Hunt in a meeting earlier in the day.
"I wish that my concerns had been taken more seriously from day one, not just as a wife but as someone who knows Matt's research from head to toe. But I'm positive that at least now that the Foreign Office are taking a firmer stance," she told CNN's "Hala Gorani Tonight."
In essence the UAE's definition of threats to its security (a definition that verges on the paranoid to its critics) had butted heads with the Western notions of freedom of expression and due process. Tejada said, "I don't trust the UAE judicial system. The way the case has been handled has been very concerning and against all international standards in spite of what the UAE insist on."
His family said Hedges had been questioned without a lawyer and coerced into signing a confession statement in Arabic that he didn't understand. The Gulf Studies Centre at Exeter University tweeted: "It's an alarming day for human rights and academia." And the Times thundered: "Diplomacy is hard enough when foes act in a belligerent and arbitrary way. It is harder still when friends start to do the same."
The UAE authorities appear to recognize that they have a problem. Attorney General Hamad Al Shamsi was quick to point out that Hedges can appeal to the Supreme Court for a retrial, while the Foreign Ministry insisted that he had been treated fairly and was not asked to sign documents he did not understand. Some analysts expect a rapid process followed by deportation.
On Friday, the UAE confirmed it was considering a request for clemency from the Hedges family.
The Hedges case is one more example of the West's main allies in Arabia testing the limits of its patience. Both the UAE and Saudi Arabia find themselves under pressure over the humanitarian catastrophe of their Yemen campaign. The US and Europe are unhappy at the way they picked a fight with Qatar last year and don't seem amenable to mediation.
Added to which, Saudi Crown Prince Mohammed bin Salman is still trying to emerge from the dark shadow of the Khashoggi killing, as speculation swirls about whether he knew of the conspiracy.
However, it is a two-way street. The West needs Saudi Arabia and the UAE as stable counterweights to Iran and it still needs their fossil fuels. It wants their investment and their weapons purchases.
President Trump acknowledged as much in a remarkable statement of realpolitik this week. National security demanded the US protect its relationship with Saudi Arabia, he said, regardless of who was responsible for the murder of Khashoggi.
"It could very well be that the crown prince had knowledge of this tragic event -- maybe he did and maybe he didn't!" Trump said. But the Saudis "have been very responsive to my requests to keeping oil prices at reasonable levels," and hundreds of thousands of jobs depended on Saudi investment.
Likewise, if in a minor key, the UK has a deep relationship with the UAE. Their armed forces conducted joint exercises last year; more than 120,000 British citizens live and work in the UAE. The UAE is a lucrative export market for the UK. Emirati investment in Britain is substantial, with the Brexit-related fall in the value of the pound attracting property buyers from the Gulf.
Canada has found out the hard way that Saudi Arabia reacts badly to criticism. When the Foreign Ministry spoke up against the detention of a prominent female activist this summer (including a tweet in Arabic), the kingdom reacted furiously -- suspending air links and ordering thousands of Saudi students to leave Canada, as well as expelling the Canadian ambassador.
It was a signal to Western governments that anything deemed interference in the scale and pace of reforms in the kingdom is out of bounds. The message was heard loud and clear; the European Union preferred a private dialogue on the matter.
Both the UAE and Saudi Arabia are very much "top-down" in their power structures; there is no room for dissent. Both Mohammed bin Salman and Crown Prince Mohammed bin Zayed Al-Nahyan of Abu Dhabi are intolerant of challenges to their authority, whether from the Islamist Muslim Brotherhood or more liberal trends. Power is concentrated in few hands and ambitious economic reforms go hand in hand with repression of alternative views. Accountability is not part of the deal.
The relationship between the major Western countries and their Arabian allies will continue to be an awkward equation: Fundamental interests will often be tested by fundamental differences. And Western governments will draw their red lines in different places.
Germany and Denmark are stopping weapons sales to Saudi Arabia over the Khashoggi case and the Yemen campaign. The UK insists its influence in Riyadh is all the greater because it is a major arms supplier. Foreign Secretary Hunt told lawmakers this week that suspending arms deliveries would mean that "British influence -- far from being able to bring both sides together -- would reduce to zero."
The equation is starkly illustrated by US policy in the Middle East. In April the State Department's human rights report cataloged some 50 pages of abuses in Saudi Arabia. It passed into the archive without a murmur. To President Trump, US sanctions against the Kingdom would only open the door to China and Russia, give Iran room for mischief and mess with the price of oil.
But realpolitik can return to haunt you.
Back in 1985, the American commentator Charles Krauthammer rejoiced in the Washington Post that the US "can play as cool a game of Realpolitik as anyone."
"And who can blame us?" he went on. "We must take our allies where we find them."
He was complimenting the Reagan administration's constructive engagement with Saddam Hussein in Iraq.