LAST year, 125 people were executed in Saudi Arabia. Two-thirds were foreigners, most of them from countries like Pakistan and India. The majority died by the sword, although the Saudi judicial system is squeamish about using this method on women; female defendants who have been sentenced to death are more likely to face a firing squad. Is a fusillade of bullets a better way to die than having your head swept from your neck by a sword-wielding executioner? I have no idea. What I do know is that Amnesty International has a lengthy catalogue of criticisms of the Saudi judicial system, beginning with the way in which suspects are arrested.

People are detained arbitrarily, and there is no proper process for dealing with them after they have been picked up. They are held in detention without access to lawyers and released - if they are lucky - just as abruptly. In cases which come to trial, the proceedings are secret and defendants are frequently faced in court with confessions extracted under duress or torture. Sentencing is arbitrary at the whim of the trial judges or the king and it is carried out after what amounts to a summary trial.

Ironically, in view of their harrowing accounts of intimidating and sexual assaults during interrogation, the two British nurses freed last week were spared some of the worst indignities of the Saudi system. "Certainly they seem to have had better treatment than many others," an Amnesty spokesman confirmed. In this context, "better" has a special meaning: it is clear that the nurses' confessions were extracted under duress, that Lucille McLauchlan was intimidated into implicating Deborah Parry in the murder of Yvonne Gilford, and that their trial took place in circumstances which bear no resemblance to an impartial hearing.

To make this observation is not, as the Daily Mail claimed, evidence of a xenophobic assumption that "Arab justice is barbaric and unsophisticated". Defendants are no more likely to get a fair trial in Saudi Arabia than I am to get a job in Tony Blair's Cabinet reshuffle; to squabble over whether or not the nurses are innocent, as commentators have done since their return to Britain on Thursday, is close to laughable, unless you are naive enough to believe that trial by tabloid is any more effective at discovering the truth than beating two terrified women. The fact that, as things stand, we have no idea who killed Ms Gilford can be attributed solely to the reluctance of the Saudi police to carry out a proper investigation. What we can say with certainty is that the nurses' convictions, if they were reviewed by an impartial authority - the Court of Appeal, say - would be dismissed as unsafe in no time at all.

WHAT the case illustrates vividly is the way in which a conflicting set of assumptions about race and gender has been at work, obscuring the real issues. The nurses have benefited incalculably from their nationality and from Britain's status as the second largest foreign investor in Saudi Arabia. British companies have poured an estimated pounds 2.5bn into the kingdom and it is clear that delicate commercial relations are not assisted by one trading partner publicly executing citizens of the other. Not just any citizens, but nurses and women - a combination guaranteed to excite feelings of chivalrous outrage in the home country.

At the same time, in a state which rigidly imposes sexual apartheid, gender almost certainly counted against Ms Parry and Ms McLauchlan. Any single woman who has visited certain countries in the Middle East or Asia knows that her lack of a spouse will be regarded with incredulity, which is why I once invented a husband and five children while travelling alone in Bangladesh. The accusations of lesbianism against the nurses, invented by the Saudi police, are the product of ludicrous minds which regard women's sexuality as threatening and voracious. In a country where women drivers are considered an affront to the nation's manhood and banned accordingly, the spectacle of a group of single, professional, foreign women living together is going to mean only one thing. The notion of a lesbian quarrel also saved the Saudi police the inconvenience of having to look further afield for a motive for Ms Gilford's murder.

Now that the two British women are home, another set of assumptions has come into play. "Nurses back to make a killing", the Sun announced, an unsubtle reminder that they belong to a profession which is supposed to preserve life, not destroy it. Women convicted of murder or manslaughter are generally treated more harshly than men, as we can see from the contrasting treatment meted out to two convicted killers, Mary Bell and Sean O'Callaghan, whose book about his IRA activities has just been serialised in the Daily Telegraph. But if these decisions - "good" killer versus "bad" killer - seem somewhat arbitrary, last Thursday's unseemly scenes at Gatwick Airport gave an unusually frank insight into how they are arrived at. Crudely, whether or not editors believe the nurses' protestations of innocence seems to depend on whether they have bought their stories - not quite such rough justice as the woman received in Saudi Arabia, but a close second.

NOR can these events be divorced from money in the larger sense, with intense diplomatic efforts taking place to prevent the nurse's allegations of torture damaging commercial relations between Britain and Saudi Arabia - especially the huge al-Yamamah arms deal. To that end, praise has been heaped on Saudi Arabia's ambassador in London, Ghazi Algosaibi, who is said to have worked tirelessly behind the scenes to secure the women's release.

A few months ago, I wrote in this column about Dr Algosaibi's reaction to a public protest against his country's treatment of the imprisoned nurses, when a group of artists calling itself Cunst Art handed out satirical invitations to behead the ambassador. I received in return an unctuous letter from Dr Algosaibi, insisted that he has a sense of humour and enclosing a signed volume of his essays. The letter confirmed something I already knew, which is that Dr Algosaibi is an urbane diplomat who knows how to handle the media. This should not blind us to the fact that, as last week's events confirmed, he works for a racist, sexist, undemocratic regime whose record on human rights is quite simply shameful.