THE time has come to look at the story behind the story of the spin doctor and his boss. No, not Charlie Whelan and Gordon Brown. I'm talking about Father Noel Barry and Cardinal Thomas Winning. Father Barry, you will recall, recently sued the Sun newspaper for libel. He won the case unspectacularly, but also ''lost it'' very spectacularly indeed; the press aide managed not only to shoot himself in the foot but to machine-gun his boss on the very day that the Cardinal was celebrating the fiftieth anniversary of his ordination.

For illumination, it is necessary to turn the reel back to the Bishop Roddy Wright fiasco. Some time before that particular landmine exploded, Cardinal Winning had been visited by Wright's worried housekeeper, who had seen alarming evidence. After the meeting, the woman felt she had been dismissed as a somewhat neurotic nosey-parker. (One wonders if there would have been a different outcome had the whistle-blower been a male cleric, rather than an elderly woman coming down in a bus from Oban.)

A year later, the ecclesiastical fan began to whirl with a vengeance. The housekeeper had been right. As the Wright case began to unravel, the hierarchy went into institution-protection mode. Yet the truth kept leaking out. The regular sight of a sweating, defensive Cardinal could be viewed only through cracks between the fingers. It is impossible not to feel sorry for the beleaguered prelate; but to this day there remain many unanswered questions about the handling of a major

crisis which, had it involved a Government Minister rather than an ecclesiastical leader, would have been pressed to a conclusion. The normally vocal

Cardinal angrily refused to answer any more questions - and the press, with uncharacteristic meekness, dutifully went away.

Though Father Barry won his action with substantially reduced damages, it was an unmitigated public relations disaster. One witness said that she had met with Cardinal Winning to lay her story before him - including evidence (which was later admitted under cross-examination in court) that she and Father Barry had spent a night in a hotel room together - in the hope that the damages action would thereby be stopped. According to her testimony under oath, the Cardinal was unsympathetic, asked if she had any tapes, and at one point asked her, ''What do you want, tears?''

No-one can be sure what took place at that meeting. What is significant, though, is that one respected Catholic layman put his head above the parapet to aver that an unsympathetic response on the part of the Cardinal would not necessarily be untypical. Thus the scene was set for the whirring of a familiar fan, and a daily diet of lurid headlines involving the conjunction of words like ''priest'', ''ex-nun'', ''love letters'', and ''condoms''. It was the Catholic case from hell. It may now be rerun in court, following this week's decision by the Sun to appeal.

Lurking in the background of all this is an unedifying combination of hubris, deeply unhealthy attitudes to sex, poor attitude to women, and lack of openness. My admiration for Catholic spirituality and the commitment and generosity of both priests and lay

people is very strong. But the Roman Catholic Church must surely tackle this seriously disfiguring culture. The Protestant track record is pretty inglorious as well.

For us to understand the recurrent nature of the crisis, the reel must be wound even further back. The historic downgrading of women within the Church is a miserable tale. Church historians could substantiate this view with hundreds of quotations, but let these cheery words to women - from Tertullian, one of the most revered Fathers of the early Church - suffice: ''The sentence of God on this sex of yours lives in this age. You are the devil's gateway . . . you destroyed so easily God's image, man.''

Virginity was regarded as a holier state than matrimony. Monks were instructed to look at the ground whenever a woman was in the vicinity. The testimony of a woman did not really count. In tandem with all the elevated talk about the Virgin Mary, the historical literature breathes a culture of contempt for women and fear of female sexuality. The Protestant Reformers were no better.

Eventually, celibacy - a powerful sign when voluntarily chosen - became fatefully linked to the priesthood. Thereafter, if a priest fell in love and married, he had to give up his priesthood and was made to feel an outcast. (I know: my cousin married a fine man who was a priest - he was treated like a leper. How was he supposed to feel when he saw Rome welcoming married Anglican clergy into the priesthood, simply because they opposed the ordination of women in their own Church? What hurt lies in all of this!)

Many, many Catholics today utterly repudiate this demeaning theology. Nor is the current disquiet felt by many Catholics over recent events down to a lack of sympathy for human frailty. No: it is a hard-to-eradicate culture of lack of transparency, distorted sexuality, stifling of debate, and (nowadays more subtle) diminishing of women which is on trial. Where is the forum for adult discussion of these critical issues?

This is a much wider issue than the competence of one particular senior churchman. It is no secret in the Catholic Church that Tom Winning is a charming and good ''people person'' - unless you happen to be a woman bearing bad tidings or someone asking awkward questions. He is a good priest, who speaks up well for poor people; but in terms of ecclesiastical leadership, the conclusion is inescapable that he is a prisoner of a mindset which can no longer be allowed to flourish unchallenged.

The new Scotland needs religious leadership - of all Churches - which is genuinely open and courageous: not in the sense of making spin-

doctored ''controversial'' headlines from a safe and unaccountable place, but one which transcends the imprisoning limits of the historically conditioned Catholic and Protestant tribal mentalities.