On Thursday last week Lord Justice Moses and his colleague Mr Justice Sullivan, sitting in the Queen's bench division of the high court, handed down a judgment of the very first importance to the rule of law in England and Wales. Its central thrust is that no agency, public or private, inside or outside the jurisdiction of the courts of this land, can be allowed to pervert the course of justice here by threats and blackmail. It is essential that the independence of the justice system be maintained, for otherwise - to apply a phrase the judges themselves used - "the rule of law is nothing".

The judgment is the result of a judicial review of the decision by the director of the Serious Fraud Office (SFO) to shut down an investigation into allegations of corruption in the sale of fighter aircraft to Saudi Arabia by BAE Systems.

The whole sorry saga of this huge deal is by now familiar (read the full Guardian report here); it started in 1986 under a Tory government, and has been subject to efforts by all successive governments to hush up the investigation at the prompting of the Saudis, who threatened to scotch the deal and withdraw from mutual intelligence and security arrangements. Indeed the crucial moment came after a visit to Tony Blair by Prince Bandar bin Sultan bin Abdul Aziz al-Saud, who quite bluntly ordered Blair to have the investigation stopped. And, appallingly, Blair obeyed. At that point the SFO was just about to access details of Saudi royal family accounts in Swiss banks.

In the days since the publication of Moses's judgment last Thursday, the government, with the immediately promised support of the Conservative party, has indicated that it intends to introduce legislation which would allow it to halt investigations carried out by the police and such bodies as the SFO if in its view they imperil national security or the lives of British citizens. This is therefore a key moment in our history: is the justice system of this country going to lose its independence and be made subject to the executive, or is the appeal to "national security" going to continue to trump every consideration of principle, civil liberties and law, often in the starkest and most opportunistic way. Take for example the home secretary's announcement in the last few days, usefully - expediently? cynically? - in the run-up to the vote on 42-day detention without charge, that we face over 30 serious terror threats at present?

National security is without question a high priority, and the government has a duty to protect the lives of its citizens at home and abroad. But as the Moses judgment emphatically entails, this has to be done consistently with the rule of law and principles of justice. Not only is the independence of the criminal justice system fundamental to the very existence of a rule of law, but national security itself depends on the independence and inviolability of the law. For if the justice system is shown to be manipulable by threats of the kind made by the Saudis, national security is thereby further imperilled. The judges point this out very clearly: "Lest it be thought that there is any true distinction between national security and the rule of law, we need only refer to the attorney general's adoption of the principle that preserving the rule of law constitutes an important component in the means by which democracy is secured".

What is dismaying about the government's intention to limit the independence of the justice system in the interest - or with the excuse - of national security considerations, is that in effect it and the Conservative opposition are colluding to cover their backs in the very greasy matter of their implication in a corruption affair. Yet this fact, in view of the principles at stake, is almost incidental: politicians will always try to escape being caught in winking at huge bribes and corruption, and covering it up. But doing so by wrecking the heart and foundation of the rule of law is about as disgusting and unprincipled as it is possible to get.

Moses's judgement is an exemplary piece of work. A model of clarity in prose and devastating lucidity in reasoning, it is an outstanding and I think historic document. Everyone should read it, both for the example it sets of the highest standards of intellect and principle, and because it strikes at the heart of the dilemma of our time: the way our democracy and its institutions are being subjected to manipulation, cover-up and dishonesty of purpose, to the extent that they can even be bought by outsiders.

One might even say that Moses has brought tablets of law from the mountain top; down below, the worshippers at the golden calf of expediency are preparing to smash them, in part to cover their own backs in an ignominious matter in which the honour and integrity of British law has been sold for a large mess of pottage; thereby not just covering the country in ignominy, but seeking to undermine the justice system itself.

And to whom has the justice system been sold? To the country which copiously funds the spread of hardline Wahhabism around the world, a version of Islam which is congenial to fundamentalism and extremism. It is said that the "gift" given to al-Saud - which he has acknowledged receiving (while denying that it was a bribe) - was an Airbus airliner and £1bn. Well: we already knew that by our reliance on Middle Eastern oil we are none-too-indirectly paying for the terrorism in our midst; I've said as much on this site before, and I've also said that much of the harm that is accruing to us is the result of our own mistaken reaction to terrorism. This reaction is to diminish our own civil liberties - and now to threaten to undermine the very system of justice which is their underpinning and mainstay.

Sign up for the Guardian Today

Our editors' picks for the day's top news and commentary delivered to your inbox each morning.