Of all the things the government might wish to encourage around the world, now more than ever, democracy and its accompanying dignities should be high on the list. And certainly there was praise in Downing Street when four years ago, amid jubilation and a stunningly high turnout, the Arab spring brought free and fair elections to Egypt. This was a distant cry from the present-day horrors of Islamic State and its visitations of violence across borders: surely the polling booths were no threat to western city streets.

The Muslim Brotherhood-inspired government that followed this festival of voting showed its inexperience and did too little to build broader support, particularly with liberals. Yet it easily avoided the criminal abuses of power and violence that have characterised military dictatorship in Egypt since Gamal Abdel Nasser – and it had the considerable merit of being elected, in a region where that was a remarkable distinction. So it was no surprise that senior members of the ruling Freedom and Justice party were lauded guests in London, even visiting Chequers to break bread with David Cameron in his country home.

It wasn’t to last. The silence characterising London’s and Washington’s response to the military destruction of Egypt’s democracy in 2013 may have smelt more of complicity than disapproval, but worse was to follow. The prime minister was not only disinclined to speak up for his former dinner guests in their time of need; he was about to turn on them himself.

Any examination of the thuggish new military government could wait. Executions, mass shootings and show trials were put to one side as Cameron ordered a hostile UK government review into the Muslim Brotherhood’s activities in Britain, just months after tanks had forced its elected government from office. Egyptian generals, saved only by state immunity from being prosecuted for crimes against humanity, might be honoured guests in London, but the deposed ministers of an overthrown democracy were not.

British policymakers, it seems, were not in the mood to indulge these inexperienced, even inept, new democrats. And we may be sure that other, less tenderly minded players in the region noticed.

Any lingering puzzlement at the prime minister’s behaviour was emphatically dispelled when the Guardian recently revealed documents exposing the price tag likely to have attached to any alternative British policy that stood for democracy or failed to demonise victims of the military violence that destroyed it.

These documents made clear that suggestions from its detractors that the Muslim Brotherhood review was just a cynical device to ingratiate Downing Street with nervous allies in the Gulf weren’t just paranoia, as the government repeatedly claimed. In fact, the truth was cruder: principles, the sheikhs had made clear, would cost money.

Senior UAE figures explicitly threatened that, unless the British turned decisively against the Muslim Brotherhood during its period in government billions of pounds worth of arms deals would be lost. And, as Paddy Ashdown told the BBC yesterday, it took just a phone call from the Saudis to persuade the prime minister to launch his review “almost off the top of his head”.

It would be naive to dispute that an argument exists for Britain’s arms industry, as an export asset, to be protected and sustained. Morality and international comity are not always easy companions and our alliances in the Gulf have real strategic value. But in allowing himself to be bundled into quite such an ugly corner Cameron may have confused the wider national interest with the passing satisfaction of bank transfers. He may have passed too much control over our Middle East policy to despots addicted to cruelty.

Certainly, in the light of the unspeakable horrors in Paris, for Britain to have selected for special treatment and condemnation the only mass political movement in the Arab world to have sought legitimacy through suffrage seems a singularly tragic error.

In making it, the prime minister may have rubbed up against parts of the British state possessed of much finer instincts than his own. Sir John Jenkins, the former UK ambassador to Saudi Arabia, who led the review, is not so supine in the face of oil-rich tantrums. He has reportedly declined to find that the Muslim Brotherhood represents a serious security threat in the UK at least – and he will not be bullied into tempering his view.

Most probably it is this unwelcome conclusion that has caused repeated postponements to a prime ministerial announcement railing against Islamists in our midst, so keenly anticipated by securocrats, to follow hard on the review. Instead, having foolishly agreed to humour Britain’s friends in the Gulf by traducing participants in a democratic experiment that the oil kingdoms were certainly right to fear, Cameron may now be reluctant to announce substantial measures against the Muslim Brotherhood for fear of provoking their lawyers into bringing a judicial review to force the publication of a report whose unhelpful conclusions he would prefer to keep hidden.

It would be damning irony indeed if the prime minister’s sole achievement in this demeaning affair was to give Whitehall a lesson in the emptiness of appeasement.