Chris Fisher, political editor It was national security versus the law, and the law lost. Tony Blair’s decision on that in the Al Yamamah case, and yesterday’s High Court ruling on it, have further illustrated a big culture clash between the judiciary and the executive, says political editor CHRIS FISHER

Chris Fisher, political editor

The present prime minister's recently well-publicised admiration for Lady Thatcher may have diminished rather yesterday when the implications of the High Court ruling on the Serious Fraud Office and the Al-Yamamah arms deal began to sink in at No 10. And his angst over Tony Blair may well have increased.

Those two predecessors have together managed to land his beleaguered administration in another fine mess.

The Al Yamamah agreement, signed in 1985, provided for BAE Systems (or British Aerospace as it then was) to supply 72 Tornado and 30 Hawk planes to Saudi Arabia. Signed by then defence secretary Michael Heseltine, it was worth a colossal £43bn, and Lady Thatcher was very pleased with it. She thought it was a great commercial success - not least because she knew it would generate thousands of jobs in Britain.

Some other people took a very different view. They were less impressed by the economic benefits of the deal and Saudi Arabia's strategic importance as a key ally of the West than by that country's bad human rights record. Allegations also surfaced that the contract had been facilitated by the payment of hundreds of millions of pounds of kickbacks or bribes to some prominent Saudis, including some members of the ruling royal family.

A report into the matter by the National Audit Office was suppressed in 1992. But the controversy refused to go away, and in 2004 the Serious Fraud Office launched an investigation.

Two years later it became clear that in lifting a number of stones, the SFO had caused substantial irritation and discomfort both in Saudi Arabia and Britain. Parts of the media began to speculate that another BAE-Saudi deal would be lost if the investigation was not brought to a close. And matters came to a head in December 2006 following a visit by the Saudi Prince Bandar to London in which he met Foreign Office officials.

A few days later, Mr Blair wrote to attorney general Lord Goldsmith warning him that continuation of the SFO inquiry could jeopardise Saudi co-operation with Britain in the war on terror.

The SFO was also directly told, in a briefing by the British ambassador to Saudi Arabia that "British lives on British streets" were at stake. Following that, an internal SFO memorandum asked: "If this caused another 7/7, how could we say our investigation is more important?"

On December 14 Lord Goldsmith announced in the House of Lords that the SFO had called off its inquiry. In the core of his statement he said: "The director of the Serious Fraud Office has decided to discontinue the investigation into the affairs of BAE Systems plc as far as they relate to the Al Yamamah defence contract.

The decision has been taken following representations that have been made both to the attorney general and the director concerning the need to safeguard national and international security. It has been necessary to balance the need to maintain the rule of law against the wider public interest. No weight has been given to commercial interests or to the national economic interest."

In elaboration, Lord Goldsmith said he had obtained the views of the prime minister, foreign secretary and defence secretary as to the public interest considerations of the investigation, and "they have expressed the clear view that continuation of the investigation would cause serious damage to UK/Saudi security, intelligence and diplomatic co-operation, which is likely to have serious negative consequences for the United Kingdom public interest in terms of both national security and our highest priority foreign policy objectives in the Middle East."

This is arguably one of the most remarkable statements ever made to parliament by a minister. It was not so much transparent as naked in its admission that the rule of law had been put in the scales against national security and had come off second best. There was, moreover, no attempt to conceal that great political pressure had been exerted on the SFO by Mr Blair and other ministers. It was an extraordinary and astonishing formal acknowledgement of the triumph of realpolitik.

In reflecting on what happened at that time, High Court judges Lord Justice Moses and Mr Justice Sullivan emphasised yesterday that "no-one, whether in this country or outside, is entitled to interfere with the course of our justice" and that "it is the failure of the government and the defendant (the SFO director) to bear that essential principle in mind that justifies the intervention of this court".

The accusations contained in these words against Mr Blair, Lord Goldsmith and others are striking and profound. But do not expect any apologies. The former prime minister will no doubt have thought long and hard before intervening in the way he did, and will have convinced himself - as with going to war in Iraq - that he was doing the right thing.

Only a day after the ruling that Abu Qatada could not be deported to Jordan, the courts have again illustrated a culture clash with the executive.

On the one side is a fundamentalist commitment to the law as the paramount force in our society. On the other is a philosophy which says that on occasion the law can be trumped or have a blind eye turned to it if strict observance would endanger the very existence of the society it underpins.

Another reason for the attitude Mr Blair finally took was a belief that the SFO inquiry, however long it lasted and however much trouble it caused, would eventually get nowhere. It was difficult for it to do otherwise, given the fact that some of the key players were Saudis who has no intention of co-operating.

If that was true then, it remains so today. Is there really any point in forcing the SFO to consider re-opening its inquiry? If not, the new outpourings of moral indignation and fresh damage to relations with Saudi Arabia will be to no good purpose either.